Class: D3api::Follower
Constant Summary collapse
- FOLLOWER_MAPPINGS =
{ :slug => 'slug', :name => 'name', :portrait => 'portrait', :active_skills => nil }
Instance Attribute Summary collapse
-
#active_skills ⇒ Object
Returns the value of attribute active_skills.
-
#name ⇒ Object
Returns the value of attribute name.
-
#portrait ⇒ Object
Returns the value of attribute portrait.
-
#slug ⇒ Object
Returns the value of attribute slug.
Instance Method Summary collapse
-
#initialize(region, follower_type) ⇒ Follower
constructor
A new instance of Follower.
Methods included from Request
Methods included from Connection
Constructor Details
#initialize(region, follower_type) ⇒ Follower
Returns a new instance of Follower.
12 13 14 15 16 17 18 |
# File 'lib/d3api/follower.rb', line 12 def initialize(region, follower_type) json_response = find(region, follower_type) values = super json_response set_method(values, FOLLOWER_MAPPINGS) end |
Instance Attribute Details
#active_skills ⇒ Object
Returns the value of attribute active_skills.
10 11 12 |
# File 'lib/d3api/follower.rb', line 10 def active_skills @active_skills end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/d3api/follower.rb', line 10 def name @name end |
#portrait ⇒ Object
Returns the value of attribute portrait.
10 11 12 |
# File 'lib/d3api/follower.rb', line 10 def portrait @portrait end |
#slug ⇒ Object
Returns the value of attribute slug.
10 11 12 |
# File 'lib/d3api/follower.rb', line 10 def slug @slug end |