Class: Ruflow::Action
- Inherits:
-
Object
- Object
- Ruflow::Action
- Defined in:
- lib/ruflow/action.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
- .change_options(_options = {}) ⇒ Object
- .input_type ⇒ Object
- .start(param = nil) ⇒ Object
- .with_custom_options(_options = {}) ⇒ Object
Instance Method Summary collapse
Class Attribute Details
.options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/ruflow/action.rb', line 4 def @options end |
Class Method Details
.change_options(_options = {}) ⇒ Object
8 9 10 |
# File 'lib/ruflow/action.rb', line 8 def ( = {}) self. = .merge() end |
.input_type ⇒ Object
37 38 39 |
# File 'lib/ruflow/action.rb', line 37 def input_type [:input] end |
.start(param = nil) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ruflow/action.rb', line 18 def start(param = nil) _param = param.nil? ? [:default_input] : param type_check_input!(_param, input_type) output_port_and_value = self.new.start(_param) check_return!(output_port_and_value) output_port, value = output_port_and_value check_output_port_is_defined!(output_port) output_type = [:output][output_port] type_check_output!(value, output_type) [output_port, value] end |
.with_custom_options(_options = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/ruflow/action.rb', line 12 def ( = {}) klass = self.clone klass.() klass end |
Instance Method Details
#start(value = nil) ⇒ Object
82 83 84 |
# File 'lib/ruflow/action.rb', line 82 def start(value = nil) raise NotImplementedError, 'Overwrite instance method start' end |