Module: Legion::Extensions::Actors::Base

Includes:
Helpers::Lex
Included in:
Every, Loop, Nothing, Once, Poll, Subscription
Defined in:
lib/legion/extensions/actors/base.rb

Instance Method Summary collapse

Methods included from Helpers::Lex

#default_settings, #function_desc, #function_example, #function_options, #function_set, included, #runner_desc

Methods included from Helpers::Logger

#handle_exception, #log

Methods included from Helpers::Core

#find_setting, #settings

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

Instance Method Details

#argsObject



29
30
31
# File 'lib/legion/extensions/actors/base.rb', line 29

def args
  {}
end

#check_subtask?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/legion/extensions/actors/base.rb', line 33

def check_subtask?
  true
end

#enabled?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/legion/extensions/actors/base.rb', line 41

def enabled?
  true
end

#functionObject



21
22
23
# File 'lib/legion/extensions/actors/base.rb', line 21

def function
  nil
end

#generate_task?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/legion/extensions/actors/base.rb', line 37

def generate_task?
  false
end

#manualObject



14
15
16
17
18
19
# File 'lib/legion/extensions/actors/base.rb', line 14

def manual
  runner_class.send(runner_function, **args)
rescue StandardError => e
  Legion::Logging.error e.message
  Legion::Logging.error e.backtrace
end

#runnerObject



7
8
9
10
11
12
# File 'lib/legion/extensions/actors/base.rb', line 7

def runner
  Legion::Runner.run(runner_class: runner_class, function: function, check_subtask: check_subtask?, generate_task: generate_task?)
rescue StandardError => e
  Legion::Logging.error e.message
  Legion::Logging.error e.backtrace
end

#use_runner?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/legion/extensions/actors/base.rb', line 25

def use_runner?
  true
end