Class: Stealth::Migrations::InternalConfigurationsProxy
- Inherits:
-
Object
- Object
- Stealth::Migrations::InternalConfigurationsProxy
- Defined in:
- lib/stealth/migrations/configurator.rb
Instance Attribute Summary collapse
-
#configurations ⇒ Object
readonly
Returns the value of attribute configurations.
Instance Method Summary collapse
-
#initialize(configurations) ⇒ InternalConfigurationsProxy
constructor
A new instance of InternalConfigurationsProxy.
- #on(config_key) ⇒ Object
Constructor Details
#initialize(configurations) ⇒ InternalConfigurationsProxy
Returns a new instance of InternalConfigurationsProxy.
10 11 12 |
# File 'lib/stealth/migrations/configurator.rb', line 10 def initialize(configurations) @configurations = configurations end |
Instance Attribute Details
#configurations ⇒ Object (readonly)
Returns the value of attribute configurations.
8 9 10 |
# File 'lib/stealth/migrations/configurator.rb', line 8 def configurations @configurations end |
Instance Method Details
#on(config_key) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/stealth/migrations/configurator.rb', line 14 def on(config_key) if @configurations[config_key] && block_given? @configurations[config_key] = yield(@configurations[config_key]) || @configurations[config_key] end @configurations[config_key] end |