Class: NPR::Audio
Overview
Audio represents all the available audio that is packaged with a particular story. Audio features the following attributes:
-
id
: the unique ID for the audio -
duration
: the duration in seconds of the audio -
title
: the title of the audio piece -
formats
: audio pieces come in three different formats: MP3, Windows Media, and Real Audio. Audio of the different formats can be accessed by a hash like so:audio.formats[:mp3]
. Hash options are:mp3
,:wm
,:rm
, and:ram
.:ram
is more likely to show up with older stories.
Constant Summary collapse
- FORMATS =
[:mp3, :wm, :rm, :ram]
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#formats ⇒ Object
Returns the value of attribute formats.
-
#id ⇒ Object
Returns the value of attribute id.
-
#mp3_rights ⇒ Object
Returns the value of attribute mp3_rights.
-
#rights_holder ⇒ Object
Returns the value of attribute rights_holder.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
Method Summary
Methods inherited from Content
Constructor Details
This class inherits a constructor from NPR::Content
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
15 16 17 |
# File 'lib/rubynpr/audio.rb', line 15 def duration @duration end |
#formats ⇒ Object
Returns the value of attribute formats.
15 16 17 |
# File 'lib/rubynpr/audio.rb', line 15 def formats @formats end |
#id ⇒ Object
Returns the value of attribute id.
15 16 17 |
# File 'lib/rubynpr/audio.rb', line 15 def id @id end |
#mp3_rights ⇒ Object
Returns the value of attribute mp3_rights.
15 16 17 |
# File 'lib/rubynpr/audio.rb', line 15 def mp3_rights @mp3_rights end |
#rights_holder ⇒ Object
Returns the value of attribute rights_holder.
15 16 17 |
# File 'lib/rubynpr/audio.rb', line 15 def rights_holder @rights_holder end |
#title ⇒ Object
Returns the value of attribute title.
15 16 17 |
# File 'lib/rubynpr/audio.rb', line 15 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
15 16 17 |
# File 'lib/rubynpr/audio.rb', line 15 def type @type end |