Class: MaimaiNet::Constants::AchievementFlag
- Inherits:
-
Object
- Object
- MaimaiNet::Constants::AchievementFlag
- Includes:
- ModuleExt
- Defined in:
- lib/maimai_net/constants.rb
Constant Summary collapse
- COMBO =
i(fc ap)
- SYNC =
i(sync fs fsd)
- PLUS =
i(fc ap fs fsd)
- RESULT_TO_RECORD =
{ fsd: :fdx, }
- KEYS =
sym_iter.call do |k, bk, plus| k.upcase end
- RECORD =
sym_iter.call do |k, bk, plus| bk = RESULT_TO_RECORD.fetch(bk.to_sym, bk).to_s [k.upcase, -(plus ? "#{bk}p" : bk)] end.to_h
- RESULT =
sym_iter.call do |k, bk, plus| [k.upcase, -(plus ? "#{bk}plus" : bk)] end.to_h
Instance Attribute Summary collapse
-
#key ⇒ Object
(also: #id, #to_sym)
readonly
Returns the value of attribute key.
-
#record_key ⇒ Object
readonly
Returns the value of attribute record_key.
-
#result_key ⇒ Object
readonly
Returns the value of attribute result_key.
Instance Method Summary collapse
-
#initialize(key) ⇒ AchievementFlag
constructor
A new instance of AchievementFlag.
Constructor Details
#initialize(key) ⇒ AchievementFlag
Returns a new instance of AchievementFlag.
179 180 181 182 183 184 185 186 |
# File 'lib/maimai_net/constants.rb', line 179 def initialize(key) @key = key @record_key = RECORD[key] @result_key = RESULT[key] freeze end |
Instance Attribute Details
#key ⇒ Object (readonly) Also known as: id, to_sym
Returns the value of attribute key.
188 189 190 |
# File 'lib/maimai_net/constants.rb', line 188 def key @key end |
#record_key ⇒ Object (readonly)
Returns the value of attribute record_key.
189 190 191 |
# File 'lib/maimai_net/constants.rb', line 189 def record_key @record_key end |
#result_key ⇒ Object (readonly)
Returns the value of attribute result_key.
189 190 191 |
# File 'lib/maimai_net/constants.rb', line 189 def result_key @result_key end |