Class: ActiveVlc::CLI::Pipe

Inherits:
Thor
  • Object
show all
Defined in:
lib/activevlc/cli/pipe.rb

Instance Method Summary collapse

Instance Method Details

#dump(path, *inputs) ⇒ Object



27
28
29
# File 'lib/activevlc/cli/pipe.rb', line 27

def dump(path, *inputs)
  _load_pipe(path, *inputs) { |pipe| pipe.dump }
end

#exec(path, *inputs) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/activevlc/cli/pipe.rb', line 14

def exec(path, *inputs)
  _load_pipe(path, *inputs) do |pipe|
    fragment = pipe.fragment
    if options[:cmd]
      Kernel.exec "vlc -I dummy -vvv #{fragment} vlc://quit"
    else
      ActiveVlc::Runner.new(pipe).run
    end
  end

end

#fragment(path, *inputs) ⇒ Object



8
9
10
# File 'lib/activevlc/cli/pipe.rb', line 8

def fragment(path, *inputs)
  _load_pipe(path, *inputs) { |pipe| puts pipe.fragment }
end

#testObject



33
34
35
# File 'lib/activevlc/cli/pipe.rb', line 33

def test
  puts options.inspect
end