Class: ActiveVlc::Pipeline

Inherits:
Object
  • Object
show all
Includes:
DSL::Pipeline, Parametric, PipelineDump
Defined in:
lib/activevlc/pipeline.rb

Constant Summary

Constants included from PipelineDump

ActiveVlc::PipelineDump::TAB_WIDTH

Instance Attribute Summary collapse

Attributes included from Parametric

#parameters

Instance Method Summary collapse

Methods included from PipelineDump

#_dump, #_dump_depth, #_find_in_ancestors

Constructor Details

#initialize(input_array_or_string = nil, &block) ⇒ Pipeline

Returns a new instance of Pipeline.



24
25
26
27
28
29
30
# File 'lib/activevlc/pipeline.rb', line 24

def initialize(input_array_or_string = nil, &block)
  super()
  @input = Stage::Input.new(input_array_or_string)
  @sout = Stage::Stream.new # SOut = Stream Out

  ::ActiveVlc::DSL::Stream.new(@sout).instance_eval(&block) if block_given?
end

Instance Attribute Details

#inputObject (readonly)

Returns the value of attribute input.



22
23
24
# File 'lib/activevlc/pipeline.rb', line 22

def input
  @input
end

#soutObject (readonly)

Returns the value of attribute sout.



22
23
24
# File 'lib/activevlc/pipeline.rb', line 22

def sout
  @sout
end

Instance Method Details

#dumpObject



46
47
48
# File 'lib/activevlc/pipeline.rb', line 46

def dump
  "ActiveVlc: Dumping pipeline internal representation\n" + _dump
end

#fragmentObject



32
33
34
# File 'lib/activevlc/pipeline.rb', line 32

def fragment
  [@input.fragment, @sout.fragment].join ' '
end

#has_missing_parameter?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/activevlc/pipeline.rb', line 41

def has_missing_parameter?
  @sout.has_missing_parameter?
end

#visit(params) ⇒ Object Also known as: params



36
37
38
39
# File 'lib/activevlc/pipeline.rb', line 36

def visit(params)
  @parameters.merge!(params)
  @sout.visit(@parameters)
end