Class: DiabloApi::Hero
- Inherits:
-
Object
- Object
- DiabloApi::Hero
- Includes:
- DiabloApi::Helper::Converter, Profiles::Hero
- Defined in:
- lib/diablo_api/hero.rb
Instance Attribute Summary collapse
-
#battle_tag ⇒ Object
readonly
Returns the value of attribute battle_tag.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#hero_id ⇒ Object
readonly
Returns the value of attribute hero_id.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
Instance Method Summary collapse
-
#initialize(region, locale, battle_tag, hero_id) ⇒ Hero
constructor
A new instance of Hero.
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_tag ⇒ Object (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 |
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/diablo_api/hero.rb', line 9 def data @data end |
#hero_id ⇒ Object (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 |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
9 10 11 |
# File 'lib/diablo_api/hero.rb', line 9 def locale @locale end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
9 10 11 |
# File 'lib/diablo_api/hero.rb', line 9 def region @region end |