Class: Legion::Extensions::Actors::Loop
- Inherits:
-
Object
- Object
- Legion::Extensions::Actors::Loop
- Includes:
- Concurrent::Async, Base
- Defined in:
- lib/legion/extensions/actors/loop.rb
Instance Method Summary collapse
- #action(**_opts) ⇒ Object
- #cancel ⇒ Object
-
#initialize ⇒ Loop
constructor
A new instance of Loop.
- #run ⇒ Object
Methods included from Base
#args, #check_subtask?, #enabled?, #function, #generate_task?, #manual, #runner, #use_runner?
Methods included from Helpers::Lex
#default_settings, #function_desc, #function_example, #function_options, #function_set, included, #runner_desc
Methods included from Helpers::Logger
Methods included from Helpers::Core
Methods included from Helpers::Base
#actor_class, #actor_const, #actor_name, #calling_class, #calling_class_array, #from_json, #full_path, #lex_class, #lex_const, #lex_name, #normalize, #runner_class, #runner_const, #runner_name, #to_dotted_hash
Constructor Details
Instance Method Details
#action(**_opts) ⇒ Object
22 23 24 |
# File 'lib/legion/extensions/actors/loop.rb', line 22 def action(**_opts) Legion::Logging.warn 'An extension is using the default action for a loop' end |
#cancel ⇒ Object
26 27 28 |
# File 'lib/legion/extensions/actors/loop.rb', line 26 def cancel @loop = false end |
#run ⇒ Object
18 19 20 |
# File 'lib/legion/extensions/actors/loop.rb', line 18 def run action while @loop end |