Class: ActiveVlc::Stage::Duplicate

Inherits:
Base
  • Object
show all
Defined in:
lib/activevlc/stage/duplicate.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 inherited from Base

#[], #[]=

Methods included from Parametric

#has_missing_parameter?, #visit

Methods included from PipelineDump

#_dump, #_dump_depth, #_find_in_ancestors

Constructor Details

#initializeDuplicate

Returns a new instance of Duplicate.



20
21
22
23
# File 'lib/activevlc/stage/duplicate.rb', line 20

def initialize()
  super(:duplicate)
  @stages = []
end

Instance Attribute Details

#stagesObject (readonly)

Returns the value of attribute stages.



16
17
18
# File 'lib/activevlc/stage/duplicate.rb', line 16

def stages
  @stages
end

Instance Method Details

#<<(stage) ⇒ Object



25
26
27
28
29
# File 'lib/activevlc/stage/duplicate.rb', line 25

def <<(stage)
  @stages.push stage
  @stages.flatten!
  self
end

#fragmentObject



31
32
33
34
35
36
# File 'lib/activevlc/stage/duplicate.rb', line 31

def fragment
  f = @stages.map do |s|
    "dst=#{s.fragment}"
  end.join ', '
  "duplicate{#{f}}"
end