Class: Wordfor::Configuration

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

Class Method Summary collapse

Class Method Details

.configObject



10
11
12
# File 'lib/wordfor/configuration.rb', line 10

def config
  @config ||= YAML.load(File.open(config_file))
end

.config_fileObject



14
15
16
17
# File 'lib/wordfor/configuration.rb', line 14

def config_file
  user = Etc.getlogin
  File.join(Dir.home(user), ".wordfor.yml")
end

.log_fileObject



19
20
21
22
# File 'lib/wordfor/configuration.rb', line 19

def log_file
  user = Etc.getlogin
  File.join(Dir.home(user), ".wordfor.log")
end

.method_missing(method) ⇒ Object



6
7
8
# File 'lib/wordfor/configuration.rb', line 6

def method_missing(method)
  config[method.to_s]
end