Class: MaimaiNet::Constants::LevelGroup
- Inherits:
-
Object
- Object
- MaimaiNet::Constants::LevelGroup
- Includes:
- ModuleExt
- Defined in:
- lib/maimai_net/constants.rb
Constant Summary collapse
- LIBRARY =
(1..15).flat_map do |i| i < 7 ? i : [i, :"#{i}+"] end.map do |k| :"L#{k}" end .each_with_index.map do |k, i| [k, i.succ] end.to_h
- DELUXE =
LIBRARY
- DELUXE_WEBSITE =
LIBRARY
Instance Attribute Summary collapse
-
#deluxe_id ⇒ Object
readonly
Returns the value of attribute deluxe_id.
-
#deluxe_web_id ⇒ Object
readonly
Returns the value of attribute deluxe_web_id.
-
#id ⇒ Object
(also: #to_i)
readonly
Returns the value of attribute id.
-
#key ⇒ Object
(also: #to_sym)
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key) ⇒ LevelGroup
constructor
A new instance of LevelGroup.
Constructor Details
#initialize(key) ⇒ LevelGroup
Returns a new instance of LevelGroup.
380 381 382 383 384 385 386 387 388 |
# File 'lib/maimai_net/constants.rb', line 380 def initialize(key) @key = key @id = LIBRARY[key] @deluxe_id = DELUXE[key] @deluxe_web_id = DELUXE_WEBSITE[key] freeze end |
Instance Attribute Details
#deluxe_id ⇒ Object (readonly)
Returns the value of attribute deluxe_id.
391 392 393 |
# File 'lib/maimai_net/constants.rb', line 391 def deluxe_id @deluxe_id end |
#deluxe_web_id ⇒ Object (readonly)
Returns the value of attribute deluxe_web_id.
391 392 393 |
# File 'lib/maimai_net/constants.rb', line 391 def deluxe_web_id @deluxe_web_id end |
#id ⇒ Object (readonly) Also known as: to_i
Returns the value of attribute id.
391 392 393 |
# File 'lib/maimai_net/constants.rb', line 391 def id @id end |
#key ⇒ Object (readonly) Also known as: to_sym
Returns the value of attribute key.
390 391 392 |
# File 'lib/maimai_net/constants.rb', line 390 def key @key end |