Class: Rafflesia::MemberPermissionsResponse

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/auth/member_permissions_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  projects: :projects,
  workflows: :workflows
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#projectsObject

Returns the value of attribute projects.



13
14
15
# File 'lib/rafflesia/auth/member_permissions_response.rb', line 13

def projects
  @projects
end

#workflowsObject

Returns the value of attribute workflows.



13
14
15
# File 'lib/rafflesia/auth/member_permissions_response.rb', line 13

def workflows
  @workflows
end