Class: Kanal::Core::Helpers::ParameterBag
- Inherits:
-
Object
- Object
- Kanal::Core::Helpers::ParameterBag
- Defined in:
- lib/kanal/core/helpers/parameter_bag.rb
Overview
Generic parameter bag class that stores named parameters
Direct Known Subclasses
Instance Method Summary collapse
- #get(name) ⇒ Object
-
#initialize ⇒ ParameterBag
constructor
A new instance of ParameterBag.
- #set(name, value) ⇒ Object
Constructor Details
#initialize ⇒ ParameterBag
Returns a new instance of ParameterBag.
8 9 10 |
# File 'lib/kanal/core/helpers/parameter_bag.rb', line 8 def initialize @parameters = {} end |
Instance Method Details
#get(name) ⇒ Object
12 13 14 |
# File 'lib/kanal/core/helpers/parameter_bag.rb', line 12 def get(name) @parameters[name] end |
#set(name, value) ⇒ Object
16 17 18 |
# File 'lib/kanal/core/helpers/parameter_bag.rb', line 16 def set(name, value) @parameters[name] = value end |