Class: Mediakit::Initializers::FFmpeg::Base
- Inherits:
-
Object
- Object
- Mediakit::Initializers::FFmpeg::Base
show all
- Defined in:
- lib/mediakit/initializers/ffmpeg.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(command) ⇒ Base
Returns a new instance of Base.
19
20
21
|
# File 'lib/mediakit/initializers/ffmpeg.rb', line 19
def initialize(command)
@command = command
end
|
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
17
18
19
|
# File 'lib/mediakit/initializers/ffmpeg.rb', line 17
def items
@items
end
|
Instance Method Details
#call ⇒ Object
23
24
25
26
|
# File 'lib/mediakit/initializers/ffmpeg.rb', line 23
def call
@command.send(item_type).concat(parse_items)
@command.send(item_type).freeze
end
|
#create_item(line) ⇒ Object
36
37
38
|
# File 'lib/mediakit/initializers/ffmpeg.rb', line 36
def create_item(line)
raise(NotImplementedError)
end
|
#item_type ⇒ Object
28
29
30
|
# File 'lib/mediakit/initializers/ffmpeg.rb', line 28
def item_type
raise(NotImplementedError)
end
|
#parse_items ⇒ Object
40
41
42
43
44
45
46
47
48
|
# File 'lib/mediakit/initializers/ffmpeg.rb', line 40
def parse_items
items = []
raw_items.each do |line|
chomped_text = line.chomp
item = create_item(chomped_text)
items << item if item
end
items
end
|
#raw_items ⇒ Object
32
33
34
|
# File 'lib/mediakit/initializers/ffmpeg.rb', line 32
def raw_items
raise(NotImplementedError)
end
|