Class: SDM::WorkflowRole

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

WorkflowRole links a role to a workflow. The linked roles indicate which roles a user must be a part of to request access to a resource via the workflow.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id: nil, role_id: nil, workflow_id: nil) ⇒ WorkflowRole

Returns a new instance of WorkflowRole.



19167
19168
19169
19170
19171
19172
19173
19174
19175
# File 'lib/models/porcelain.rb', line 19167

def initialize(
  id: nil,
  role_id: nil,
  workflow_id: nil
)
  @id = id == nil ? "" : id
  @role_id = role_id == nil ? "" : role_id
  @workflow_id = workflow_id == nil ? "" : workflow_id
end

Instance Attribute Details

#idObject

Unique identifier of the WorkflowRole.



19161
19162
19163
# File 'lib/models/porcelain.rb', line 19161

def id
  @id
end

#role_idObject

The role id.



19163
19164
19165
# File 'lib/models/porcelain.rb', line 19163

def role_id
  @role_id
end

#workflow_idObject

The workflow id.



19165
19166
19167
# File 'lib/models/porcelain.rb', line 19165

def workflow_id
  @workflow_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



19177
19178
19179
19180
19181
19182
19183
# File 'lib/models/porcelain.rb', line 19177

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end