Class: Wordfor::Configuration
- Inherits:
-
Object
- Object
- Wordfor::Configuration
- Defined in:
- lib/wordfor/configuration.rb
Class Method Summary collapse
Class Method Details
.config ⇒ Object
10 11 12 |
# File 'lib/wordfor/configuration.rb', line 10 def config @config ||= YAML.load(File.open(config_file)) end |
.config_file ⇒ Object
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_file ⇒ Object
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 |