Class: EhbrsRubyUtils::Music::LyricsBook::Album
- Inherits:
-
Resource
- Object
- Resource
- EhbrsRubyUtils::Music::LyricsBook::Album
show all
- Defined in:
- lib/ehbrs_ruby_utils/music/lyrics_book/album.rb
Instance Attribute Summary
Attributes inherited from Resource
#previous
Instance Method Summary
collapse
Methods inherited from Resource
#<=>, create_list, #filename, #header_id, #header_index, #index_id, #link_to_header, #output_index, #output_main, #type
Instance Method Details
#artist ⇒ Object
28
29
30
|
# File 'lib/ehbrs_ruby_utils/music/lyrics_book/album.rb', line 28
def artist
from_songs_tag(:artist)
end
|
#book ⇒ Object
12
13
14
|
# File 'lib/ehbrs_ruby_utils/music/lyrics_book/album.rb', line 12
def book
parent
end
|
#first_previous ⇒ Object
16
17
18
|
# File 'lib/ehbrs_ruby_utils/music/lyrics_book/album.rb', line 16
def first_previous
previous.if_present { |v| v.songs.last }
end
|
24
25
26
|
# File 'lib/ehbrs_ruby_utils/music/lyrics_book/album.rb', line 24
def
"#{songs.first.number}-#{songs.last.number} | #{artist} | #{title}"
end
|
#title ⇒ Object
32
33
34
|
# File 'lib/ehbrs_ruby_utils/music/lyrics_book/album.rb', line 32
def title
from_songs_tag(:album)
end
|
#valid? ⇒ Boolean
20
21
22
|
# File 'lib/ehbrs_ruby_utils/music/lyrics_book/album.rb', line 20
def valid?
songs.any?
end
|