Class: Greenenvy::InnerContext
- Inherits:
-
Object
- Object
- Greenenvy::InnerContext
- Defined in:
- lib/greenenvy/context.rb
Instance Method Summary collapse
-
#initialize(name_validator, settings) ⇒ InnerContext
constructor
A new instance of InnerContext.
- #set(name, value) ⇒ Object
Constructor Details
#initialize(name_validator, settings) ⇒ InnerContext
Returns a new instance of InnerContext.
50 51 52 53 |
# File 'lib/greenenvy/context.rb', line 50 def initialize(name_validator, settings) @name_validator = name_validator @settings = settings end |
Instance Method Details
#set(name, value) ⇒ Object
55 56 57 58 |
# File 'lib/greenenvy/context.rb', line 55 def set(name, value) @name_validator.validate!(name) @settings[name.to_sym] = value end |