Class: Rubot::DSL::BehaviorFactory
- Inherits:
-
Object
- Object
- Rubot::DSL::BehaviorFactory
- Defined in:
- lib/rubot/dsl.rb
Instance Method Summary collapse
- #create_for_robot(robot, adapter, given_args = {}) ⇒ Object
-
#initialize(name, accepted_args, fire, sensors) ⇒ BehaviorFactory
constructor
A new instance of BehaviorFactory.
Constructor Details
#initialize(name, accepted_args, fire, sensors) ⇒ BehaviorFactory
Returns a new instance of BehaviorFactory.
45 46 47 48 49 50 |
# File 'lib/rubot/dsl.rb', line 45 def initialize(name, accepted_args, fire, sensors) @name = name @accepted_args = accepted_args @fire = fire @sensors = sensors end |
Instance Method Details
#create_for_robot(robot, adapter, given_args = {}) ⇒ Object
52 53 54 |
# File 'lib/rubot/dsl.rb', line 52 def create_for_robot(robot, adapter, given_args={}) BehaviorContext.new(@name, @accepted_args, @fire, @sensors, robot, adapter, given_args).behavior end |