Class: MaimaiNet::Constants::LevelGroup

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_idObject (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_idObject (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

#idObject (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

#keyObject (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