Class: ClosedLoop::Machine::Base
- Inherits:
-
Object
- Object
- ClosedLoop::Machine::Base
- Defined in:
- lib/closed_loop/machine/base.rb
Direct Known Subclasses
Constant Summary collapse
- ATTRIBUTES =
%i[machine to from role].freeze
Instance Method Summary collapse
-
#initialize(config, proc = nil) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(config, proc = nil) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 |
# File 'lib/closed_loop/machine/base.rb', line 8 def initialize(config, proc = nil) config.slice(*ATTRIBUTES).each { |k, v| instance_variable_set("@#{k}", v) } @proc = proc end |