Class: Osu::DB::Mod
- Inherits:
-
Object
- Object
- Osu::DB::Mod
- Defined in:
- lib/osu-db/mods.rb
Constant Summary collapse
- EZ =
Easy
Mod.new(1, 'Easy')
- NF =
No Fail
Mod.new(0, 'NoFail')
- HT =
Half Time
Mod.new(8, 'HalfTime')
- HR =
Hard Rock
Mod.new(4, 'HardRock')
- SD =
Sudden Death
Mod.new(5, 'SuddenDeath')
- PF =
Perfect (based on SD)
Mod.new(14, '+Perfect')
- DT =
Double Time
Mod.new(6, 'DoubleTime')
- NC =
Night Core (based on DT)
Mod.new(9, '+NightCore')
- HD =
Hidden
Mod.new(3, 'Hidden')
- FL =
Flash Light
Mod.new(10, 'FlashLight')
- RL =
Relax
Mod.new(-1, 'Relax')
- AP =
Auto Pilot
Mod.new(-1, 'AutoPilot')
- SO =
Spun Out
Mod.new(12, 'SpunOut')
Class Method Summary collapse
-
.all ⇒ Object
Return all ranked mods.
Instance Method Summary collapse
-
#initialize(index, name) ⇒ Mod
constructor
A new instance of Mod.
- #to_i ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(index, name) ⇒ Mod
Returns a new instance of Mod.
4 5 6 7 |
# File 'lib/osu-db/mods.rb', line 4 def initialize(index, name) @index = index @name = name end |
Class Method Details
Instance Method Details
#to_i ⇒ Object
9 10 11 |
# File 'lib/osu-db/mods.rb', line 9 def to_i 1 << @index end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/osu-db/mods.rb', line 13 def to_s @name end |