Module: Get::Configuration
- Included in:
- Get
- Defined in:
- lib/get/configuration.rb
Instance Method Summary collapse
- #adapter ⇒ Object
- #configuration ⇒ Object
- #configure {|configuration| ... } ⇒ Object
- #reset ⇒ Object
Instance Method Details
#adapter ⇒ Object
16 17 18 19 |
# File 'lib/get/configuration.rb', line 16 def adapter raise ::Get::Errors::Base.new('Adapter has not been configured') unless configuration.adapter @adapter ||= configuration.adapter end |
#configuration ⇒ Object
3 4 5 |
# File 'lib/get/configuration.rb', line 3 def configuration @configuration ||= Config.new end |
#configure {|configuration| ... } ⇒ Object
12 13 14 |
# File 'lib/get/configuration.rb', line 12 def configure yield(configuration) end |
#reset ⇒ Object
7 8 9 10 |
# File 'lib/get/configuration.rb', line 7 def reset @configuration = Config.new @adapter, @adapter_map = nil, nil # Class-level cache clear end |