Class: MaimaiNet::Constants::Genre

Inherits:
Object
  • Object
show all
Includes:
ModuleExt
Defined in:
lib/maimai_net/constants.rb

Constant Summary collapse

ORIGINAL =
{
  pop_anime:   3,
  niconico:    4,
  touhou:      5,
  sega:        6,
  variety:     7,
  original:    8,
  all:         9,
}
DELUXE_WEBSITE =
{
  all:        99,
  pop_anime: 101,
  niconico:  102,
  touhou:    103,
  variety:   104,
  maimai:    105,
  siblings:  106,
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ Genre

Returns a new instance of Genre.



301
302
303
304
305
306
307
308
# File 'lib/maimai_net/constants.rb', line 301

def initialize(key)
  @key = key

  @original_id   = ORIGINAL[key]
  @deluxe_web_id = DELUXE_WEBSITE[key]

  freeze
end

Instance Attribute Details

#abbrevObject (readonly)

Returns the value of attribute abbrev.



310
311
312
# File 'lib/maimai_net/constants.rb', line 310

def abbrev
  @abbrev
end

#deluxe_web_idObject (readonly)

Returns the value of attribute deluxe_web_id.



311
312
313
# File 'lib/maimai_net/constants.rb', line 311

def deluxe_web_id
  @deluxe_web_id
end

#keyObject (readonly) Also known as: id, to_sym

Returns the value of attribute key.



310
311
312
# File 'lib/maimai_net/constants.rb', line 310

def key
  @key
end

#original_idObject (readonly)

Returns the value of attribute original_id.



311
312
313
# File 'lib/maimai_net/constants.rb', line 311

def original_id
  @original_id
end