Class: Rubyhub::Configuration
- Inherits:
-
Object
- Object
- Rubyhub::Configuration
- Includes:
- Singleton
- Defined in:
- lib/rubyhub/configuration.rb
Constant Summary collapse
- CONFIG_PATH =
'.rubyhub.yml'.freeze
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 |
# File 'lib/rubyhub/configuration.rb', line 13 def initialize @options = self.class.exists? ? load_from_file : {} end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/rubyhub/configuration.rb', line 9 def @options end |
Class Method Details
.exists? ⇒ Boolean
18 19 20 |
# File 'lib/rubyhub/configuration.rb', line 18 def exists? File.exist?(CONFIG_PATH) end |