Module: Hancock::PluginConfiguration::ClassMethods
- Defined in:
- lib/hancock/plugin_configuration.rb
Instance Method Summary collapse
- #config ⇒ Object
- #config_class ⇒ Object
- #configuration ⇒ Object
- #configure {|configuration| ... } ⇒ Object
- #reconfigure! ⇒ Object
Instance Method Details
#config ⇒ Object
7 8 9 |
# File 'lib/hancock/plugin_configuration.rb', line 7 def config configuration end |
#config_class ⇒ Object
22 23 |
# File 'lib/hancock/plugin_configuration.rb', line 22 def config_class end |
#configuration ⇒ Object
4 5 6 |
# File 'lib/hancock/plugin_configuration.rb', line 4 def configuration @configuration ||= config_class.new if config_class end |
#configure {|configuration| ... } ⇒ Object
11 12 13 |
# File 'lib/hancock/plugin_configuration.rb', line 11 def configure yield configuration end |
#reconfigure! ⇒ Object
15 16 17 18 19 20 |
# File 'lib/hancock/plugin_configuration.rb', line 15 def reconfigure! if config_class @configuration = config_class.new configure &block if block_given? end end |