Class: Cejo::Media::Info
- Inherits:
-
Object
- Object
- Cejo::Media::Info
- Defined in:
- lib/cejo/media/get/info.rb
Overview
Media information
Instance Attribute Summary collapse
-
#codec ⇒ Object
Returns the value of attribute codec.
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#parser ⇒ Object
Returns the value of attribute parser.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #audio_command ⇒ Object
- #extension ⇒ Object
-
#initialize(url, codec, current) ⇒ Info
constructor
A new instance of Info.
- #program ⇒ Object
- #title ⇒ Object
- #to_s ⇒ Object
- #video_command ⇒ Object
Constructor Details
Instance Attribute Details
#codec ⇒ Object
Returns the value of attribute codec.
10 11 12 |
# File 'lib/cejo/media/get/info.rb', line 10 def codec @codec end |
#current ⇒ Object (readonly)
Returns the value of attribute current.
9 10 11 |
# File 'lib/cejo/media/get/info.rb', line 9 def current @current end |
#parser ⇒ Object
Returns the value of attribute parser.
10 11 12 |
# File 'lib/cejo/media/get/info.rb', line 10 def parser @parser end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
9 10 11 |
# File 'lib/cejo/media/get/info.rb', line 9 def url @url end |
Instance Method Details
#audio_command ⇒ Object
27 28 29 |
# File 'lib/cejo/media/get/info.rb', line 27 def audio_command "#{program} #{current.out} '#{current.title}.#{current.ext}' #{current.audio} #{codec} #{url}" end |
#extension ⇒ Object
31 32 33 34 |
# File 'lib/cejo/media/get/info.rb', line 31 def extension parser.fmt = :ext parser.result end |
#program ⇒ Object
19 20 21 |
# File 'lib/cejo/media/get/info.rb', line 19 def program current.name end |
#title ⇒ Object
36 37 38 39 |
# File 'lib/cejo/media/get/info.rb', line 36 def title parser.fmt = :title parser.result end |
#to_s ⇒ Object
49 50 51 |
# File 'lib/cejo/media/get/info.rb', line 49 def to_s "#{title}.#{extension}" end |
#video_command ⇒ Object
23 24 25 |
# File 'lib/cejo/media/get/info.rb', line 23 def video_command "#{program} #{current.out} '#{current.title}.#{current.ext}' #{current.video} #{codec} #{url}" end |