Sha256: 4f320f3c761de11a7384f4140fb2b73af82f09270804dce3f46f7e9825547bff

Contents?: true

Size: 633 Bytes

Versions: 14

Compression:

Stored size: 633 Bytes

Contents

module Ecoportal
  module API
    class V1
      class PersonSchemas
        include Enumerable
        attr_reader :client
        def initialize(client)
          @client = client
        end

        def each(params: {}, &block)
          return to_enum(:each) unless block
          get_all.each(&block)
        end

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

        private

        def person_schema_class
          V1::PersonSchema
        end
      end
    end
  end
end

require 'ecoportal/api/v1/person_schema'

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ecoportal-api-0.3.8 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.3.6 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.3.5 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.3.4 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.3.3 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.3.1 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.3.0 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.3.0.pre1 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.2.2 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.2.1 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.2.0 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.1.12 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.1.11 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.1.10 lib/ecoportal/api/v1/person_schemas.rb