Class: Valanga::Music::Collete

Inherits:
Base
  • Object
show all
Defined in:
lib/valanga/music/collete.rb

Constant Summary collapse

COLLETE_KEY =
%w(
  rank
  score
  achievement_rate
  miss_count
  play_count
)

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Valanga::Music::Base

Instance Method Details

#basicObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/valanga/music/collete.rb', line 12

def basic
  if has_special?
    MusicAttribute.new(create_attr(6)).tap do |attr|
      attr.name   = name
      attr.artist = artist
    end
  else
    MusicAttribute.new(create_attr(5)).tap do |attr|
      attr.name   = name
      attr.artist = artist
    end
  end
end

#hardObject



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/valanga/music/collete.rb', line 40

def hard
  if has_special?
    MusicAttribute.new(create_attr(8)).tap do |attr|
      attr.name   = name
      attr.artist = artist
    end
  else
    MusicAttribute.new(create_attr(7)).tap do |attr|
      attr.name   = name
      attr.artist = artist
    end
  end
end

#mediumObject



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/valanga/music/collete.rb', line 26

def medium
  if has_special?
    MusicAttribute.new(create_attr(7)).tap do |attr|
      attr.name   = name
      attr.artist = artist
    end
  else
    MusicAttribute.new(create_attr(6)).tap do |attr|
      attr.name   = name
      attr.artist = artist
    end
  end
end