Class: Ecoportal::API::Internal::PolicyGroups
- Inherits:
-
Object
- Object
- Ecoportal::API::Internal::PolicyGroups
- Includes:
- Enumerable
- 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(&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.
7 8 9 |
# File 'lib/ecoportal/api/internal/policy_groups.rb', line 7 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/ecoportal/api/internal/policy_groups.rb', line 6 def client @client end |
Instance Method Details
#each(&block) ⇒ Object
14 15 16 17 |
# File 'lib/ecoportal/api/internal/policy_groups.rb', line 14 def each(&block) return to_enum(:each) unless block get_all.each(&block) end |
#get_all ⇒ Object
10 11 12 13 |
# File 'lib/ecoportal/api/internal/policy_groups.rb', line 10 def get_all response = @client.get("/policy_groups") Common::WrappedResponse.new(response, Internal::PolicyGroup) end |