Class: ActiveVlc::Stage::Stream
- Defined in:
- lib/activevlc/stage/stream.rb
Direct Known Subclasses
Constant Summary
Constants included from PipelineDump
Instance Attribute Summary
Attributes inherited from Base
Attributes included from Parametric
Instance Method Summary collapse
- #<<(stage) ⇒ Object
- #fragment ⇒ Object
-
#has_missing_parameter? ⇒ Boolean
See Parametric#has_empty_param?.
-
#initialize ⇒ Stream
constructor
A new instance of Stream.
-
#visit(params) ⇒ Object
See Parametric#visit.
Methods inherited from Base
Methods included from PipelineDump
#_dump, #_dump_depth, #_find_in_ancestors
Constructor Details
#initialize ⇒ Stream
Returns a new instance of Stream.
16 17 18 19 |
# File 'lib/activevlc/stage/stream.rb', line 16 def initialize super :sout @chain = [] end |
Instance Method Details
#<<(stage) ⇒ Object
21 22 23 24 25 |
# File 'lib/activevlc/stage/stream.rb', line 21 def <<(stage) @chain.push stage @chain.flatten! self end |
#fragment ⇒ Object
37 38 39 40 41 |
# File 'lib/activevlc/stage/stream.rb', line 37 def fragment return "" if @chain.empty? sout_string = @chain.map{|s| s.fragment}.join ':' res = ":sout=\"##{sout_string}\"" end |
#has_missing_parameter? ⇒ Boolean
See Parametric#has_empty_param?
33 34 35 |
# File 'lib/activevlc/stage/stream.rb', line 33 def has_missing_parameter? @chain.reduce(super) { |accu, substage| accu or substage.has_missing_parameter? } end |
#visit(params) ⇒ Object
See Parametric#visit
28 29 30 31 |
# File 'lib/activevlc/stage/stream.rb', line 28 def visit(params) super params @chain.each { |c| c.visit(params) } end |