Class: Hobostove::Configuration
- Inherits:
-
Object
- Object
- Hobostove::Configuration
- Defined in:
- lib/hobostove/configuration.rb
Class Attribute Summary collapse
-
.current_room ⇒ Object
Returns the value of attribute current_room.
Class Method Summary collapse
Class Attribute Details
.current_room ⇒ Object
Returns the value of attribute current_room.
6 7 8 |
# File 'lib/hobostove/configuration.rb', line 6 def current_room @current_room end |
Class Method Details
.config ⇒ Object
12 13 14 |
# File 'lib/hobostove/configuration.rb', line 12 def config @config ||= YAML.load(File.open(config_file))[current_room] end |
.config_file ⇒ Object
16 17 18 19 |
# File 'lib/hobostove/configuration.rb', line 16 def config_file user = Etc.getlogin File.join(Dir.home(user), ".hobostove.yml") end |
.log_file ⇒ Object
21 22 23 24 |
# File 'lib/hobostove/configuration.rb', line 21 def log_file user = Etc.getlogin File.join(Dir.home(user), ".hobostove.log") end |
.method_missing(method) ⇒ Object
8 9 10 |
# File 'lib/hobostove/configuration.rb', line 8 def method_missing(method) config[method.to_s] end |