Class: Orocos::RubyTasks::StubTaskContext::Operation
- Inherits:
-
Object
- Object
- Orocos::RubyTasks::StubTaskContext::Operation
- Defined in:
- lib/orocos/ruby_tasks/stub_task_context.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#task_context ⇒ Object
readonly
Returns the value of attribute task_context.
Instance Method Summary collapse
- #callop(*args) ⇒ Object
-
#initialize(name, task_context) ⇒ Operation
constructor
A new instance of Operation.
- #sendop(*args) ⇒ Object
Constructor Details
#initialize(name, task_context) ⇒ Operation
Returns a new instance of Operation
65 66 67 |
# File 'lib/orocos/ruby_tasks/stub_task_context.rb', line 65 def initialize(name, task_context) @name, @task_context = name, task_context end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name
62 63 64 |
# File 'lib/orocos/ruby_tasks/stub_task_context.rb', line 62 def name @name end |
#task_context ⇒ Object (readonly)
Returns the value of attribute task_context
63 64 65 |
# File 'lib/orocos/ruby_tasks/stub_task_context.rb', line 63 def task_context @task_context end |
Instance Method Details
#callop(*args) ⇒ Object
69 70 71 |
# File 'lib/orocos/ruby_tasks/stub_task_context.rb', line 69 def callop(*args) task_context.send(name, *args) end |
#sendop(*args) ⇒ Object
73 74 75 76 77 78 |
# File 'lib/orocos/ruby_tasks/stub_task_context.rb', line 73 def sendop(*args) begin result = callop(*args) rescue Exception => e end SendHandle.new(result, e) end |