Class: Rubyhub::Configuration
- Inherits:
-
Object
- Object
- Rubyhub::Configuration
- Includes:
- Singleton
- Defined in:
- lib/rubyhub/configuration.rb
Constant Summary collapse
- CONFIG_PATH =
'.rubyhub.yml'.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 |
# File 'lib/rubyhub/configuration.rb', line 12 def initialize @options = self.class.exists? ? load_from_file : {} end |
Class Method Details
.exists? ⇒ Boolean
21 22 23 |
# File 'lib/rubyhub/configuration.rb', line 21 def exists? File.exist?(CONFIG_PATH) end |
Instance Method Details
#to_h ⇒ Object
16 17 18 |
# File 'lib/rubyhub/configuration.rb', line 16 def to_h @options.to_h end |