Class: Hindbaer::Clip
- Inherits:
-
Object
- Object
- Hindbaer::Clip
- Defined in:
- lib/hindbaer/clip.rb
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
Instance Method Summary collapse
-
#initialize(fragment, group) ⇒ Clip
constructor
A new instance of Clip.
- #length ⇒ Object
- #leq ⇒ Object
- #name ⇒ Object
- #reference ⇒ Object
Constructor Details
#initialize(fragment, group) ⇒ Clip
Returns a new instance of Clip.
4 5 6 7 |
# File 'lib/hindbaer/clip.rb', line 4 def initialize(fragment, group) @doc = fragment @group = group end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
9 10 11 |
# File 'lib/hindbaer/clip.rb', line 9 def group @group end |
Instance Method Details
#length ⇒ Object
20 21 22 |
# File 'lib/hindbaer/clip.rb', line 20 def length @doc['Length'] end |
#leq ⇒ Object
24 25 26 27 |
# File 'lib/hindbaer/clip.rb', line 24 def leq return '-' if @doc['Leq'] == '-' @doc['Leq'].to_f end |
#name ⇒ Object
16 17 18 |
# File 'lib/hindbaer/clip.rb', line 16 def name @doc['Name'] end |
#reference ⇒ Object
11 12 13 14 |
# File 'lib/hindbaer/clip.rb', line 11 def reference id = @doc['Ref'].to_i self.group.session.audio_pool.files.find { |a| a.id == id } end |