Class: Warcraft::Character::CategoryProgress

Inherits:
Object
  • Object
show all
Defined in:
lib/warcraft/character/achievements.rb

Instance Method Summary collapse

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

#categoryHash

Returns:

  • (Hash)


117
118
119
# File 'lib/warcraft/character/achievements.rb', line 117

def category
  @data[:category]
end

#category_idInteger

Returns:

  • (Integer)


126
127
128
# File 'lib/warcraft/character/achievements.rb', line 126

def category_id
  @data.dig(:category, :id)
end

#category_urlString

Returns:

  • (String)


131
132
133
# File 'lib/warcraft/character/achievements.rb', line 131

def category_url
  @data.dig(:category, :key, :href)
end

#full_categoryObject



121
122
123
# File 'lib/warcraft/character/achievements.rb', line 121

def full_category
  @client.get(category_url)
end

#nameHash

Returns:

  • (Hash)


112
113
114
# File 'lib/warcraft/character/achievements.rb', line 112

def name
  @data.dig(:category, :name)
end

#pointsInteger

Returns:

  • (Integer)


107
108
109
# File 'lib/warcraft/character/achievements.rb', line 107

def points
  @data[:points]
end

#quantityInteger

Returns:

  • (Integer)


102
103
104
# File 'lib/warcraft/character/achievements.rb', line 102

def quantity
  @data[:quantity]
end