Module: Preferences

Defined in:
lib/preferences/base.rb

Defined Under Namespace

Modules: User

Class Method Summary collapse

Class Method Details

.load(file_name) ⇒ Object



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

def self.load(file_name)
  YAML::load_file(file_name)
end

.save(attribs, file_name) ⇒ Object



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

def self.save(attribs, file_name)
  File.open(file_name, 'w') do |out|
    YAML::dump(attribs, out)
  end
end