Module: YamlDb::RakeTasks

Defined in:
lib/yaml_db/rake_tasks.rb

Class Method Summary collapse

Class Method Details

.data_dump_dir_taskObject


7
8
9
10
# File 'lib/yaml_db/rake_tasks.rb', line 7

def self.data_dump_dir_task
  dir = ENV['dir'] || "#{Time.now.strftime('%F_%T')}"
  SerializationHelper::Base.new(helper).dump_to_dir(dump_dir("/#{dir}"))
end

.data_dump_taskObject


3
4
5
# File 'lib/yaml_db/rake_tasks.rb', line 3

def self.data_dump_task
  SerializationHelper::Base.new(helper).dump(db_dump_data_file(helper.extension))
end

.data_load_dir_taskObject


16
17
18
19
# File 'lib/yaml_db/rake_tasks.rb', line 16

def self.data_load_dir_task
  dir = ENV['dir'] || 'base'
  SerializationHelper::Base.new(helper).load_from_dir(dump_dir("/#{dir}"))
end

.data_load_taskObject


12
13
14
# File 'lib/yaml_db/rake_tasks.rb', line 12

def self.data_load_task
  SerializationHelper::Base.new(helper).load(db_dump_data_file(helper.extension))
end