Class: ActiveVlc::Stage::Input

Inherits:
Base
  • Object
show all
Includes:
PipelineDump
Defined in:
lib/activevlc/stage/input.rb

Constant Summary

Constants included from PipelineDump

PipelineDump::TAB_WIDTH

Instance Attribute Summary collapse

Attributes inherited from Base

#options, #type

Attributes included from Parametric

#parameters

Instance Method Summary collapse

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

#inputsObject (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

#fragmentObject



38
39
40
# File 'lib/activevlc/stage/input.rb', line 38

def fragment
  @inputs.join ' '
end