Sha256: b6059e291f32b33a6c15a1bdd89db706a2d8880a371259736c011fb6e3091d92

Contents?: true

Size: 603 Bytes

Versions: 8

Compression:

Stored size: 603 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)
          get_all.each(&block)
          self
        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

8 entries across 8 versions & 1 rubygems

Version Path
ecoportal-api-0.1.9 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.1.8 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.1.7 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.1.6 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.1.5 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.1.4 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.1.3 lib/ecoportal/api/v1/person_schemas.rb
ecoportal-api-0.1.2 lib/ecoportal/api/v1/person_schemas.rb