Sha256: 0ddc6c6a5b024c43c2d83db30bb914966f05606fe15e3ecad9e1d236c9d499fb

Contents?: true

Size: 564 Bytes

Versions: 1

Compression:

Stored size: 564 Bytes

Contents

# frozen_string_literal: true

module Kentaa
  module Api
    module Responses
      class Users < Base
        include Enumerable
        include Kentaa::Api::Responses::Pagination

        def each(&block)
          users.each(&block)
        end

        private

        def users
          @users ||= begin
            users = []

            if data
              data.each do |user|
                segments << Kentaa::Api::Responses::User.new(user)
              end
            end

            users
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kentaa-api-0.1.1 lib/kentaa/api/responses/users.rb