Class: Valanga::Music
- Inherits:
-
Object
show all
- Defined in:
- lib/valanga/music.rb,
lib/valanga/music/base.rb,
lib/valanga/music/collete.rb,
lib/valanga/music/groovin.rb
Defined Under Namespace
Classes: Base, Collete, Groovin
Instance Method Summary
collapse
Constructor Details
#initialize(document) ⇒ Music
Returns a new instance of Music.
3
4
5
|
# File 'lib/valanga/music.rb', line 3
def initialize(document)
@document = Nokogiri::HTML.parse(document, nil, 'Shift_JIS')
end
|
Instance Method Details
#artist ⇒ Object
39
40
41
|
# File 'lib/valanga/music.rb', line 39
def artist
@artist ||= @document.css("div.music_artist h6").text
end
|
#collete ⇒ Object
23
24
25
|
# File 'lib/valanga/music.rb', line 23
def collete
Collete.new(self)
end
|
#groovin ⇒ Object
27
28
29
|
# File 'lib/valanga/music.rb', line 27
def groovin
Groovin.new(self)
end
|
#hard ⇒ Object
15
16
17
|
# File 'lib/valanga/music.rb', line 15
def hard
Difficulty::Hard.new(self)
end
|
#has_special? ⇒ Boolean
31
32
33
|
# File 'lib/valanga/music.rb', line 31
def has_special?
music_bk.size == 9
end
|
#name ⇒ Object
35
36
37
|
# File 'lib/valanga/music.rb', line 35
def name
@name ||= @document.css("div.music_dataname h6").text
end
|