Class: DrawerStore

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

Class Method Summary collapse

Class Method Details

.load(file) ⇒ Object



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

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

.save(object, file) ⇒ Object



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

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