Class: AssayDepot::WareProvider

Inherits:
Object
  • Object
show all
Includes:
SearchModel
Defined in:
lib/assaydepot/endpoints.rb

Class Method Summary collapse

Methods included from SearchModel

#facets, #find, included, #initialize, #internal_results, #where

Class Method Details

.endpoint(id, format = "json") ⇒ Object



154
155
156
157
158
159
160
161
# File 'lib/assaydepot/endpoints.rb', line 154

def self.endpoint(id, format="json")
  if (id.is_a?(Array) && id.length > 1)
    url = "/wares/#{id[0]}/providers/#{id[1]}.#{format}"
  else
    url = "/wares/#{id.is_a?(Array) ? id[0] : id}/providers.#{format}"
  end
  url
end

.ref_nameObject



163
164
165
# File 'lib/assaydepot/endpoints.rb', line 163

def self.ref_name
  "provider_refs"
end