Class: Ecoportal::API::V1::PersonSchemas

Inherits:
Object
  • Object
show all
Defined in:
lib/ecoportal/api/v1/person_schemas.rb

Direct Known Subclasses

Internal::PersonSchemas

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ PersonSchemas

Returns a new instance of PersonSchemas.



6
7
8
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 6

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



5
6
7
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 5

def client
  @client
end

Instance Method Details

#each(params: {}, &block) ⇒ Object



10
11
12
13
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 10

def each(params: {}, &block)
  get_all.each(&block)
  self
end

#get_allObject



15
16
17
18
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 15

def get_all
  response = @client.get("/person_schemas")
  Common::WrappedResponse.new(response, person_schema_class)
end