Module: Cardio::Mod::Sow::YamlDump
- Included in:
- Cardio::Mod::Sow
- Defined in:
- card/lib/cardio/mod/sow/yaml_dump.rb
Overview
Writing the card representations to yaml files in mod directories
Instance Method Summary collapse
-
#dump(hash) ⇒ Object
write yaml to file.
-
#filename ⇒ String
– MOD_DIR/data/ENVIRONMENT.yml.
-
#mod_path ⇒ Object
Path.
Instance Method Details
#dump(hash) ⇒ Object
write yaml to file
7 8 9 10 |
# File 'card/lib/cardio/mod/sow/yaml_dump.rb', line 7 def dump hash File.write filename, hash.to_yaml puts "#{filename} now contains #{hash.size} items".green end |
#filename ⇒ String
Returns – MOD_DIR/data/ENVIRONMENT.yml.
13 14 15 |
# File 'card/lib/cardio/mod/sow/yaml_dump.rb', line 13 def filename @filename ||= File.join mod_path, "#{@podtype}.yml" end |