Class: AudioDicer::Context::Album
- Inherits:
-
Object
- Object
- AudioDicer::Context::Album
- Defined in:
- lib/audio_dicer/context/album.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#tracks ⇒ Object
readonly
Returns the value of attribute tracks.
Instance Method Summary collapse
- #artist(artist) ⇒ Object
-
#initialize ⇒ Album
constructor
A new instance of Album.
- #name(name) ⇒ Object
- #track(title, *time) ⇒ Object
Constructor Details
#initialize ⇒ Album
Returns a new instance of Album.
6 7 8 9 |
# File 'lib/audio_dicer/context/album.rb', line 6 def initialize @tracks = [] @options = {} end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/audio_dicer/context/album.rb', line 4 def @options end |
#tracks ⇒ Object (readonly)
Returns the value of attribute tracks.
4 5 6 |
# File 'lib/audio_dicer/context/album.rb', line 4 def tracks @tracks end |
Instance Method Details
#artist(artist) ⇒ Object
11 12 13 |
# File 'lib/audio_dicer/context/album.rb', line 11 def artist(artist) @options.update(artist: artist); end |
#name(name) ⇒ Object
15 16 17 |
# File 'lib/audio_dicer/context/album.rb', line 15 def name(name) @options.update(name: name) end |
#track(title, *time) ⇒ Object
19 20 21 |
# File 'lib/audio_dicer/context/album.rb', line 19 def track(title, *time) @tracks << { title: title, time: time } end |