Class: Warcraft::Character::CategoryProgress
- Inherits:
-
Object
- Object
- Warcraft::Character::CategoryProgress
- Defined in:
- lib/warcraft/character/achievements.rb
Instance Method Summary collapse
- #category ⇒ Hash
- #category_id ⇒ Integer
- #category_url ⇒ String
- #full_category ⇒ Object
-
#initialize(client, data) ⇒ CategoryProgress
constructor
A new instance of CategoryProgress.
- #name ⇒ Hash
- #points ⇒ Integer
- #quantity ⇒ Integer
Constructor Details
#initialize(client, data) ⇒ CategoryProgress
Returns a new instance of CategoryProgress.
96 97 98 99 |
# File 'lib/warcraft/character/achievements.rb', line 96 def initialize(client, data) @client = client @data = data end |
Instance Method Details
#category ⇒ Hash
117 118 119 |
# File 'lib/warcraft/character/achievements.rb', line 117 def category @data[:category] end |
#category_id ⇒ Integer
126 127 128 |
# File 'lib/warcraft/character/achievements.rb', line 126 def category_id @data.dig(:category, :id) end |
#category_url ⇒ String
131 132 133 |
# File 'lib/warcraft/character/achievements.rb', line 131 def category_url @data.dig(:category, :key, :href) end |
#full_category ⇒ Object
121 122 123 |
# File 'lib/warcraft/character/achievements.rb', line 121 def full_category @client.get(category_url) end |
#name ⇒ Hash
112 113 114 |
# File 'lib/warcraft/character/achievements.rb', line 112 def name @data.dig(:category, :name) end |
#points ⇒ Integer
107 108 109 |
# File 'lib/warcraft/character/achievements.rb', line 107 def points @data[:points] end |
#quantity ⇒ Integer
102 103 104 |
# File 'lib/warcraft/character/achievements.rb', line 102 def quantity @data[:quantity] end |