Class: DiabloApi::Hero

Inherits:
Object
  • Object
show all
Includes:
DiabloApi::Helper::Converter, Profiles::Hero
Defined in:
lib/diablo_api/hero.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DiabloApi::Helper::Converter

#convert_hash_keys, #underscore_key

Methods included from Profiles::Hero

#class, #dead, #followers, #gender, #hardcore, #id, #items, #kills, #last_updated, #legendary_powers, #level, #main_data, #name, #paragon_level, #progression, #season_created, #seasonal, #skills, #stats

Constructor Details

#initialize(region, locale, battle_tag, hero_id) ⇒ Hero

Returns a new instance of Hero.



11
12
13
14
15
16
17
# File 'lib/diablo_api/hero.rb', line 11

def initialize(region, locale, battle_tag, hero_id)
  @region = region
  @locale = locale
  @battle_tag = battle_tag
  @hero_id = hero_id
  fetch
end

Instance Attribute Details

#battle_tagObject (readonly)

Returns the value of attribute battle_tag.



9
10
11
# File 'lib/diablo_api/hero.rb', line 9

def battle_tag
  @battle_tag
end

#dataObject (readonly)

Returns the value of attribute data.



9
10
11
# File 'lib/diablo_api/hero.rb', line 9

def data
  @data
end

#hero_idObject (readonly)

Returns the value of attribute hero_id.



9
10
11
# File 'lib/diablo_api/hero.rb', line 9

def hero_id
  @hero_id
end

#localeObject (readonly)

Returns the value of attribute locale.



9
10
11
# File 'lib/diablo_api/hero.rb', line 9

def locale
  @locale
end

#regionObject (readonly)

Returns the value of attribute region.



9
10
11
# File 'lib/diablo_api/hero.rb', line 9

def region
  @region
end