Class: D3api::Hero

Inherits:
BaseModel show all
Includes:
Request
Defined in:
lib/d3api/hero.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Request

#get

Methods included from Connection

#connection

Constructor Details

#initialize(region, battletag_name, battletag_id, hero_id) ⇒ Hero

Returns a new instance of Hero.



9
10
11
12
13
14
15
# File 'lib/d3api/hero.rb', line 9

def initialize(region, battletag_name, battletag_id, hero_id)
  json_response = find(region, battletag_name, battletag_id, hero_id)

  values = super json_response

  set_method(values)
end

Instance Attribute Details

#active_skillsObject

Returns the value of attribute active_skills.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def active_skills
  @active_skills
end

#followersObject

Returns the value of attribute followers.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def followers
  @followers
end

#genderObject

Returns the value of attribute gender.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def gender
  @gender
end

#hardcoreObject

Returns the value of attribute hardcore.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def hardcore
  @hardcore
end

#hero_classObject

Returns the value of attribute hero_class.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def hero_class
  @hero_class
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def id
  @id
end

#itemsObject

Returns the value of attribute items.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def items
  @items
end

#last_updatedObject

Returns the value of attribute last_updated.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def last_updated
  @last_updated
end

#levelObject

Returns the value of attribute level.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def level
  @level
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def name
  @name
end

#passive_skillsObject

Returns the value of attribute passive_skills.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def passive_skills
  @passive_skills
end

#statsObject

Returns the value of attribute stats.



4
5
6
# File 'lib/d3api/hero.rb', line 4

def stats
  @stats
end