Module: ActiveVlc::DSL::Pipeline::ClassMethods

Defined in:
lib/activevlc/dsl/pipeline.rb

Instance Method Summary collapse

Instance Method Details

#for(*inputs, &block) ⇒ Object



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

def for(*inputs, &block)
  pipeline = new(inputs)
  ::ActiveVlc::DSL::Stream.new(pipeline.sout).instance_eval(&block) if block_given?
  pipeline
end

#parse(path) ⇒ Object



17
18
19
20
21
22
# File 'lib/activevlc/dsl/pipeline.rb', line 17

def parse(path)
  return nil unless File.exists?(path)

  # FIXME I hope to find some cleaner way to do this at some point
  eval(File.open(path).read, nil, path, 0)
end