Class: DVDConverter::Audio
- Inherits:
-
Object
- Object
- DVDConverter::Audio
- Defined in:
- lib/dvd_converter/audio.rb
Instance Attribute Summary collapse
-
#audio_type ⇒ Object
Returns the value of attribute audio_type.
-
#code ⇒ Object
Returns the value of attribute code.
-
#ext ⇒ Object
Returns the value of attribute ext.
-
#hex ⇒ Object
Returns the value of attribute hex.
-
#language ⇒ Object
Returns the value of attribute language.
-
#track_id ⇒ Object
Returns the value of attribute track_id.
Instance Method Summary collapse
-
#initialize(id, hex, language, code, ext) ⇒ Audio
constructor
A new instance of Audio.
- #print_description ⇒ Object
Constructor Details
#initialize(id, hex, language, code, ext) ⇒ Audio
Returns a new instance of Audio.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/dvd_converter/audio.rb', line 12 def initialize(id, hex, language, code, ext) @track_id = id @hex = hex @language = language @code = code @ext = ext # Set the Audio Type if @language =~ /dts/i @audio_type = 'dts' elsif @language =~ /ac3/i @audio_type = 'ac3' else @audio_type = 'faac' end end |
Instance Attribute Details
#audio_type ⇒ Object
Returns the value of attribute audio_type.
5 6 7 |
# File 'lib/dvd_converter/audio.rb', line 5 def audio_type @audio_type end |
#code ⇒ Object
Returns the value of attribute code.
6 7 8 |
# File 'lib/dvd_converter/audio.rb', line 6 def code @code end |
#ext ⇒ Object
Returns the value of attribute ext.
7 8 9 |
# File 'lib/dvd_converter/audio.rb', line 7 def ext @ext end |
#hex ⇒ Object
Returns the value of attribute hex.
9 10 11 |
# File 'lib/dvd_converter/audio.rb', line 9 def hex @hex end |
#language ⇒ Object
Returns the value of attribute language.
10 11 12 |
# File 'lib/dvd_converter/audio.rb', line 10 def language @language end |
#track_id ⇒ Object
Returns the value of attribute track_id.
8 9 10 |
# File 'lib/dvd_converter/audio.rb', line 8 def track_id @track_id end |
Instance Method Details
#print_description ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/dvd_converter/audio.rb', line 29 def print_description print "+ Audio Track #{@track_id}: " print "#{@hex} - " print "#{@language} - " print "#{@code} - " print "#{@ext}\n" end |