Module: Remotr::Configurable::ClassMethods
- Defined in:
- lib/remotr/configurable.rb
Instance Method Summary collapse
-
#config ⇒ Object
Public: Returns the the configuration instance.
-
#configure {|config| ... } ⇒ Object
Public: Yields the configuration instance.
-
#reset! ⇒ Object
Public: Reset the configuration (useful for testing).
Instance Method Details
#config ⇒ Object
Public: Returns the the configuration instance.
11 12 13 |
# File 'lib/remotr/configurable.rb', line 11 def config @config ||= ::Remotr::Configuration.new end |
#configure {|config| ... } ⇒ Object
Public: Yields the configuration instance.
17 18 19 |
# File 'lib/remotr/configurable.rb', line 17 def configure(&block) yield config end |
#reset! ⇒ Object
Public: Reset the configuration (useful for testing).
23 24 25 |
# File 'lib/remotr/configurable.rb', line 23 def reset! @config = nil end |