Class: Kanal::Core::Helpers::ParameterBag

Inherits:
Object
  • Object
show all
Defined in:
lib/kanal/core/helpers/parameter_bag.rb

Overview

Generic parameter bag class that stores named parameters

Direct Known Subclasses

ParameterBagWithRegistrator

Instance Method Summary collapse

Constructor Details

#initializeParameterBag

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