module Cardio::Mod::Sow::YamlDump
Writing the card representations to yaml files in mod directories
Public Instance Methods
Source
# File 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
write yaml to file
Source
# File lib/cardio/mod/sow/yaml_dump.rb, line 13 def filename @filename ||= File.join mod_path, "#{@podtype}.yml" end
@return [String] – MOD_DIR/data/ENVIRONMENT.yml
Source
# File lib/cardio/mod/sow/yaml_dump.rb, line 18 def mod_path Mod.dirs.subpaths("data")[@mod] || raise(Card::Error::NotFound, "no data directory found for mod: #{@mod}") end
@return Path