Class: Coral::Util::Process
- Inherits:
-
Object
- Object
- Coral::Util::Process
- Defined in:
- lib/coral_core/util/process.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
—————————————————————————– Property accessors / modifiers.
Instance Method Summary collapse
-
#action(action_name, options = {}) ⇒ Object
—————————————————————————– Actions.
-
#initialize(name, &code) ⇒ Process
constructor
—————————————————————————– Constructor / Destructor.
-
#provider_options ⇒ Object
—.
-
#run(options = {}) ⇒ Object
—.
Constructor Details
#initialize(name, &code) ⇒ Process
Constructor / Destructor
9 10 11 12 |
# File 'lib/coral_core/util/process.rb', line 9 def initialize(name, &code) @name = name @code = code end |
Instance Attribute Details
#name ⇒ Object (readonly)
Property accessors / modifiers
17 18 19 |
# File 'lib/coral_core/util/process.rb', line 17 def name @name end |
Instance Method Details
#action(action_name, options = {}) ⇒ Object
Actions
30 31 32 33 34 |
# File 'lib/coral_core/util/process.rb', line 30 def action(action_name, = {}) if action_name == :run run() end end |
#provider_options ⇒ Object
21 22 23 24 25 |
# File 'lib/coral_core/util/process.rb', line 21 def return { :parallel => true } end |
#run(options = {}) ⇒ Object
38 39 40 |
# File 'lib/coral_core/util/process.rb', line 38 def run( = {}) @code.call() end |