Class: Checkr::APIResource

Inherits:
APIClass show all
Defined in:
lib/checkr/api_resource.rb

Instance Attribute Summary

Attributes inherited from APIClass

#json

Instance Method Summary collapse

Methods inherited from APIClass

api_class_method, api_instance_method, attribute, attribute_aliases, attribute_names, attribute_writer_alias, attribute_writer_names, #attributes, #changed_attribute_names, #changed_attributes, changed_lambda, #clear_changed_attributes, construct, #construct, #initialize, #inspect, #mark_attribute_changed, #non_nil_attributes, path, #refresh_from, register_subclass, subclass_fetch, subclasses, #to_json, #to_s

Constructor Details

This class inherits a constructor from Checkr::APIClass

Instance Method Details

#path(base = self.class.path) ⇒ Object



10
11
12
13
14
15
# File 'lib/checkr/api_resource.rb', line 10

def path(base=self.class.path)
  unless id
    raise InvalidRequestError.new("Could not determine which URL to request: #{self.class} instance has an invalid ID: #{id.inspect}", 'id')
  end
  "#{base}/#{id}"
end