Class: Checkr::DocumentList

Inherits:
APIList show all
Defined in:
lib/checkr/document_list.rb

Instance Attribute Summary collapse

Attributes inherited from APIList

#api_list_klass

Attributes inherited from APIClass

#json

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from APIList

#[], #[]=, constructor, #each, #last, #length, #refresh_from, #refresh_from_array, #refresh_from_hash

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, #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 Attribute Details

#parentObject

Returns the value of attribute parent.



7
8
9
# File 'lib/checkr/document_list.rb', line 7

def parent
  @parent
end

Class Method Details

.construct(json, parent = nil) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/checkr/document_list.rb', line 12

def self.construct(json, parent=nil)
  lambda = constructor(:Document)
  instance = lambda.call(json)
  instance.parent = parent if parent
  instance.clear_changed_attributes
  instance
end

Instance Method Details

#pathObject



20
21
22
# File 'lib/checkr/document_list.rb', line 20

def path
  parent.path + "/documents"
end