Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions flip_flap.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
require_relative 'tsv_buddy'
require_relative 'yaml_buddy'
require 'yaml'

class FlipFlap
# Do NOT create an initialize method
include TsvBuddy
include YamlBuddy

def take_yaml(yml)
@data = YAML.load(yml)
end

def to_yaml
@data.to_yaml
end
end
13 changes: 13 additions & 0 deletions yaml_buddy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module YamlBuddy

attr_accessor :data

def take_yaml(yml)
@data = YAML.load(yml)
end

def to_yaml
@data.to_yaml
end

end