class YamlDbSynch
Public Class Methods
db_dump_data_file(ext = "yml", file = "data")
click to toggle source
# File lib/yaml_db_synch.rb, line 4 def self.db_dump_data_file (ext = "yml", file = "data") "#{dump_dir}/#{file}_db.#{ext}" end
dump(file)
click to toggle source
# File lib/yaml_db_synch.rb, line 12 def self.dump(file) format_class = ENV['class'] || "YamlDb::Helper" helper = format_class.constantize SerializationHelper::Base.new(helper).dump db_dump_data_file(helper.extension, file) end
dump_dir()
click to toggle source
# File lib/yaml_db_synch.rb, line 8 def self.dump_dir "#{Rails.root}/" + SelfSysteem.test_dir + "/system/support/affirmations" end
load(file)
click to toggle source
# File lib/yaml_db_synch.rb, line 18 def self.load(file) format_class = ENV['class'] || "YamlDb::Helper" helper = format_class.constantize SerializationHelper::Base.new(helper).load file end