Sha256: 28a40bc9083413759bb56bef71cc5767fd4801cd35b43d5fa395b117d2e314ba

Contents?: true

Size: 541 Bytes

Versions: 14

Compression:

Stored size: 541 Bytes

Contents

module Ecoportal
  module API
    class Internal
      class PolicyGroups
        include Enumerable
        attr_reader :client
        def initialize(client)
          @client = client
        end
        def get_all
          response = @client.get("/policy_groups")
          Common::WrappedResponse.new(response, Internal::PolicyGroup)
        end
        def each(&block)
          return to_enum(:each) unless block
          get_all.each(&block)
        end
      end
    end
  end
end

require 'ecoportal/api/internal/policy_group'

Version data entries

14 entries across 14 versions & 1 rubygems

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