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