Module: Noteman::Config

Included in:
Display, Dropbox, Note, NoteManager
Defined in:
lib/noteman/config.rb

Constant Summary collapse

NOTEMAN_CONFIG =
File.join(Dir.home, '.notemanrc')

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



6
7
8
# File 'lib/noteman/config.rb', line 6

def config
  @config
end

Instance Method Details

#read_from_fileObject



33
34
35
36
37
38
39
# File 'lib/noteman/config.rb', line 33

def read_from_file
  c = {}
  if c.empty? && File.exists?(NOTEMAN_CONFIG)
    c = YAML.load_file(NOTEMAN_CONFIG)
  end
  c
end