Class: Ecoportal::API::Internal::PolicyGroups
- Inherits:
-
Object
- Object
- Ecoportal::API::Internal::PolicyGroups
- Defined in:
- lib/ecoportal/api/internal/policy_groups.rb
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) ⇒ PolicyGroups
constructor
A new instance of PolicyGroups.
Constructor Details
#initialize(client) ⇒ PolicyGroups
Returns a new instance of PolicyGroups.
6 7 8 |
# File 'lib/ecoportal/api/internal/policy_groups.rb', line 6 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/ecoportal/api/internal/policy_groups.rb', line 5 def client @client end |
Instance Method Details
#each(params: {}, &block) ⇒ Object
13 14 15 16 |
# File 'lib/ecoportal/api/internal/policy_groups.rb', line 13 def each(params: {}, &block) get_all.each(&block) self end |
#get_all ⇒ Object
9 10 11 12 |
# File 'lib/ecoportal/api/internal/policy_groups.rb', line 9 def get_all response = @client.get("/policy_groups") Common::WrappedResponse.new(response, Internal::PolicyGroup) end |