Class: MaimaiNet::Constants::Genre
- Inherits:
-
Object
- Object
- MaimaiNet::Constants::Genre
- 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
-
#abbrev ⇒ Object
readonly
Returns the value of attribute abbrev.
-
#deluxe_web_id ⇒ Object
readonly
Returns the value of attribute deluxe_web_id.
-
#key ⇒ Object
(also: #id, #to_sym)
readonly
Returns the value of attribute key.
-
#original_id ⇒ Object
readonly
Returns the value of attribute original_id.
Instance Method Summary collapse
-
#initialize(key) ⇒ Genre
constructor
A new instance of Genre.
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
#abbrev ⇒ Object (readonly)
Returns the value of attribute abbrev.
310 311 312 |
# File 'lib/maimai_net/constants.rb', line 310 def abbrev @abbrev end |
#deluxe_web_id ⇒ Object (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 |
#key ⇒ Object (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_id ⇒ Object (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 |