Class: EhbrsRubyUtils::Music::Ous::Album
- Inherits:
-
Node
- Object
- Node
- EhbrsRubyUtils::Music::Ous::Album
show all
- Includes:
- Comparable
- Defined in:
- lib/ehbrs_ruby_utils/music/ous/album.rb
Constant Summary
Constants inherited
from Node
Node::DEFAULT_LANGUAGE, Node::LANGUAGE_FILE_BASENAME
Instance Method Summary
collapse
Methods inherited from Node
#language, #language_file, #name, #parent_language, #real_path, #self_language, #to_s
Instance Method Details
#<=>(other) ⇒ Object
13
14
15
|
# File 'lib/ehbrs_ruby_utils/music/ous/album.rb', line 13
def <=>(other)
to_a <=> other.to_a
end
|
36
37
38
|
# File 'lib/ehbrs_ruby_utils/music/ous/album.rb', line 36
def artist
parent_node
end
|
#category ⇒ Object
40
41
42
|
# File 'lib/ehbrs_ruby_utils/music/ous/album.rb', line 40
def category
artist.parent_node
end
|
#id ⇒ Object
31
32
33
|
# File 'lib/ehbrs_ruby_utils/music/ous/album.rb', line 31
def id
[artist.name, name].join('_').variableize
end
|
#parent_node_class ⇒ Object
#to_a ⇒ Object
17
18
19
|
# File 'lib/ehbrs_ruby_utils/music/ous/album.rb', line 17
def to_a
[language, category.name, artist.name, name]
end
|
#to_circular_list_spreader_path ⇒ Object
21
22
23
|
# File 'lib/ehbrs_ruby_utils/music/ous/album.rb', line 21
def to_circular_list_spreader_path
to_a
end
|
#to_label ⇒ Object
25
26
27
|
# File 'lib/ehbrs_ruby_utils/music/ous/album.rb', line 25
def to_label
(to_a + [id]).map(&:light_white).join(' | '.blue)
end
|