Class: D3api::Artisan

Inherits:
BaseModel show all
Defined in:
lib/d3api/artisan.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Request

#get

Methods included from Connection

#connection

Constructor Details

#initialize(region = :us, artisan_type) ⇒ Artisan

Returns a new instance of Artisan.



5
6
7
8
9
10
11
# File 'lib/d3api/artisan.rb', line 5

def initialize(region=:us, artisan_type)
  json_response = find(region, artisan_type)

  values = super json_response

  set_method(values)
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/d3api/artisan.rb', line 3

def name
  @name
end

#portraitObject

Returns the value of attribute portrait.



3
4
5
# File 'lib/d3api/artisan.rb', line 3

def portrait
  @portrait
end

#slugObject

Returns the value of attribute slug.



3
4
5
# File 'lib/d3api/artisan.rb', line 3

def slug
  @slug
end

#trainingObject

Returns the value of attribute training.



3
4
5
# File 'lib/d3api/artisan.rb', line 3

def training
  @training
end