Class: ActiveVlc::Stage::Stream

Inherits:
Base
  • Object
show all
Defined in:
lib/activevlc/stage/stream.rb

Direct Known Subclasses

Chain

Constant Summary

Constants included from PipelineDump

PipelineDump::TAB_WIDTH

Instance Attribute Summary

Attributes inherited from Base

#options, #type

Attributes included from Parametric

#parameters

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=

Methods included from PipelineDump

#_dump, #_dump_depth, #_find_in_ancestors

Constructor Details

#initializeStream

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

#fragmentObject



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?

Returns:

  • (Boolean)


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