Class: D3api::Artisan

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

Instance Attribute Summary

Attributes inherited from BaseModel

#value

Instance Method Summary collapse

Methods included from Request

#get

Methods included from Connection

#connection

Constructor Details

#initialize(region, artisan_type) ⇒ Artisan

Returns a new instance of Artisan.



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

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

  super json_response
end

Instance Method Details

#find(region, artisan_type) ⇒ Object



11
12
13
# File 'lib/d3api/artisan.rb', line 11

def find(region, artisan_type)
  get(:us, "data/artisan/#{artisan_type}")
end