Class: ActiveVlc::Stage::Input
- Includes:
- PipelineDump
- Defined in:
- lib/activevlc/stage/input.rb
Constant Summary
Constants included from PipelineDump
Instance Attribute Summary collapse
-
#inputs ⇒ Object
readonly
Returns the value of attribute inputs.
Attributes inherited from Base
Attributes included from Parametric
Instance Method Summary collapse
- #<<(new_inputs) ⇒ Object
- #clear! ⇒ Object
- #fragment ⇒ Object
-
#initialize(array_or_string) ⇒ Input
constructor
A new instance of Input.
Methods included from PipelineDump
#_dump, #_dump_depth, #_find_in_ancestors
Methods inherited from Base
Methods included from Parametric
#has_missing_parameter?, #visit
Constructor Details
#initialize(array_or_string) ⇒ Input
Returns a new instance of Input.
20 21 22 23 24 25 26 |
# File 'lib/activevlc/stage/input.rb', line 20 def initialize(array_or_string) super(:input) @inputs = [array_or_string] if array_or_string.is_a? String @inputs ||= array_or_string @inputs ||= [] end |
Instance Attribute Details
#inputs ⇒ Object (readonly)
Returns the value of attribute inputs.
18 19 20 |
# File 'lib/activevlc/stage/input.rb', line 18 def inputs @inputs end |
Instance Method Details
#<<(new_inputs) ⇒ Object
28 29 30 31 32 |
# File 'lib/activevlc/stage/input.rb', line 28 def <<(new_inputs) @inputs.push new_inputs @inputs.flatten! self end |
#clear! ⇒ Object
34 35 36 |
# File 'lib/activevlc/stage/input.rb', line 34 def clear! @inputs = [] end |
#fragment ⇒ Object
38 39 40 |
# File 'lib/activevlc/stage/input.rb', line 38 def fragment @inputs.join ' ' end |