Class: RakeMKV::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/rakemkv/command.rb

Overview

Command Object

Instance Method Summary collapse

Constructor Details

#initialize(path:, command_line_class: Terrapin::CommandLine) ⇒ Command

Initialize with path



4
5
6
7
# File 'lib/rakemkv/command.rb', line 4

def initialize(path:, command_line_class: Terrapin::CommandLine)
  @path = path
  @command_line_class =  command_line_class
end

Instance Method Details

#info(options = {}) ⇒ Object

Call info command on disc



10
11
12
13
# File 'lib/rakemkv/command.rb', line 10

def info(options = {})
  arguments = build_arguments(options)
  @info ||= execute("info #{path}", arguments)
end

#mkv(title_id, destination, options = {}) ⇒ Object

Call mkv command on disc



16
17
18
19
# File 'lib/rakemkv/command.rb', line 16

def mkv(title_id, destination, options = {})
  arguments = build_arguments(options)
  @mkv ||= execute("mkv #{path} #{title_id} #{destination}", arguments)
end