Class: DrawerStore

Inherits:
Object
  • Object
show all
Defined in:
lib/drawer.rb

Class Method Summary collapse

Class Method Details

.load(file) ⇒ Object



5
6
7
# File 'lib/drawer.rb', line 5

def self.load(file)
  YAML.load_file(File.expand_path(file))
end

.save(object, file) ⇒ Object



9
10
11
12
13
# File 'lib/drawer.rb', line 9

def self.save(object, file)
  File.open(File.expand_path(file), 'w') do |f|
    YAML.dump(object, f)
  end
end