Module: Harmoniser::Configurable
- Included in:
- Harmoniser
- Defined in:
- lib/harmoniser/configurable.rb
Instance Method Summary collapse
Instance Method Details
#configuration ⇒ Object
10 11 12 13 14 |
# File 'lib/harmoniser/configurable.rb', line 10 def configuration raise NoMethodError.new("Please, configure first") unless @configuration @configuration end |
#configure {|@configuration| ... } ⇒ Object
5 6 7 8 |
# File 'lib/harmoniser/configurable.rb', line 5 def configure @configuration ||= Configuration.new yield(@configuration) end |
#default_configuration ⇒ Object
16 17 18 |
# File 'lib/harmoniser/configurable.rb', line 16 def default_configuration @configuration ||= Configuration.new end |