Class: Ecoportal::API::V1::PersonSchemas
- Inherits:
-
Object
- Object
- Ecoportal::API::V1::PersonSchemas
- Includes:
- Enumerable
- Defined in:
- lib/ecoportal/api/v1/person_schemas.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #each(params: {}, &block) ⇒ Object
- #get_all ⇒ Object
-
#initialize(client) ⇒ PersonSchemas
constructor
A new instance of PersonSchemas.
Constructor Details
#initialize(client) ⇒ PersonSchemas
Returns a new instance of PersonSchemas.
7 8 9 |
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 7 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 6 def client @client end |
Instance Method Details
#each(params: {}, &block) ⇒ Object
11 12 13 14 |
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 11 def each(params: {}, &block) return to_enum(:each) unless block get_all.each(&block) end |
#get_all ⇒ Object
16 17 18 19 |
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 16 def get_all response = @client.get("/person_schemas") Common::WrappedResponse.new(response, person_schema_class) end |