Class: Dynflow::Testing::DummyWorld
- Inherits:
-
Object
- Object
- Dynflow::Testing::DummyWorld
- Extended by:
- Mimic
- Defined in:
- lib/dynflow/testing/dummy_world.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#clock ⇒ Object
readonly
Returns the value of attribute clock.
-
#executor ⇒ Object
readonly
Returns the value of attribute executor.
-
#middleware ⇒ Object
readonly
Returns the value of attribute middleware.
Instance Method Summary collapse
- #action_logger ⇒ Object
- #event(execution_plan_id, step_id, event, future = Future.new) ⇒ Object
-
#initialize ⇒ DummyWorld
constructor
A new instance of DummyWorld.
- #logger ⇒ Object
- #persistence ⇒ Object
- #silence_logger! ⇒ Object
- #subscribed_actions(klass) ⇒ Object
Methods included from Mimic
Constructor Details
#initialize ⇒ DummyWorld
Returns a new instance of DummyWorld.
10 11 12 13 14 15 |
# File 'lib/dynflow/testing/dummy_world.rb', line 10 def initialize @logger_adapter = Testing.logger_adapter @clock = ManagedClock.new @executor = DummyExecutor.new(self) @middleware = Middleware::World.new end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
8 9 10 |
# File 'lib/dynflow/testing/dummy_world.rb', line 8 def action @action end |
#clock ⇒ Object (readonly)
Returns the value of attribute clock.
7 8 9 |
# File 'lib/dynflow/testing/dummy_world.rb', line 7 def clock @clock end |
#executor ⇒ Object (readonly)
Returns the value of attribute executor.
7 8 9 |
# File 'lib/dynflow/testing/dummy_world.rb', line 7 def executor @executor end |
#middleware ⇒ Object (readonly)
Returns the value of attribute middleware.
7 8 9 |
# File 'lib/dynflow/testing/dummy_world.rb', line 7 def middleware @middleware end |
Instance Method Details
#action_logger ⇒ Object
17 18 19 |
# File 'lib/dynflow/testing/dummy_world.rb', line 17 def action_logger @logger_adapter.action_logger end |
#event(execution_plan_id, step_id, event, future = Future.new) ⇒ Object
33 34 35 |
# File 'lib/dynflow/testing/dummy_world.rb', line 33 def event(execution_plan_id, step_id, event, future = Future.new) executor.event execution_plan_id, step_id, event, future end |
#logger ⇒ Object
21 22 23 |
# File 'lib/dynflow/testing/dummy_world.rb', line 21 def logger @logger_adapter.dynflow_logger end |
#persistence ⇒ Object
37 38 39 |
# File 'lib/dynflow/testing/dummy_world.rb', line 37 def persistence nil end |
#silence_logger! ⇒ Object
25 26 27 |
# File 'lib/dynflow/testing/dummy_world.rb', line 25 def silence_logger! action_logger.level = 4 end |
#subscribed_actions(klass) ⇒ Object
29 30 31 |
# File 'lib/dynflow/testing/dummy_world.rb', line 29 def subscribed_actions(klass) [] end |