Class: Rafflesia::MemberPermissionsResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MemberPermissionsResponse
- Defined in:
- lib/rafflesia/auth/member_permissions_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ projects: :projects, workflows: :workflows }.freeze
Instance Attribute Summary collapse
-
#projects ⇒ Object
Returns the value of attribute projects.
-
#workflows ⇒ Object
Returns the value of attribute workflows.
Instance Method Summary collapse
-
#initialize(json) ⇒ MemberPermissionsResponse
constructor
A new instance of MemberPermissionsResponse.
Constructor Details
#initialize(json) ⇒ MemberPermissionsResponse
Returns a new instance of MemberPermissionsResponse.
17 18 19 20 21 22 |
# File 'lib/rafflesia/auth/member_permissions_response.rb', line 17 def initialize(json) super() hash = self.class.normalize(json) @projects = (hash[:projects] || []).map { |item| item ? Rafflesia::MemberResourceGrant.new(item) : nil } @workflows = (hash[:workflows] || []).map { |item| item ? Rafflesia::MemberResourceGrant.new(item) : nil } end |
Instance Attribute Details
#projects ⇒ Object
Returns the value of attribute projects.
13 14 15 |
# File 'lib/rafflesia/auth/member_permissions_response.rb', line 13 def projects @projects end |
#workflows ⇒ Object
Returns the value of attribute workflows.
13 14 15 |
# File 'lib/rafflesia/auth/member_permissions_response.rb', line 13 def workflows @workflows end |