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.



19709
19710
19711
19712
19713
19714
19715
19716
19717
# File 'lib/models/porcelain.rb', line 19709

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

#id ⇒ Object

Unique identifier of the WorkflowRole.



19703
19704
19705
# File 'lib/models/porcelain.rb', line 19703

def id
  @id
end

#role_id ⇒ Object

The role id.



19705
19706
19707
# File 'lib/models/porcelain.rb', line 19705

def role_id
  @role_id
end

#workflow_id ⇒ Object

The workflow id.



19707
19708
19709
# File 'lib/models/porcelain.rb', line 19707

def workflow_id
  @workflow_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



19719
19720
19721
19722
19723
19724
19725
# File 'lib/models/porcelain.rb', line 19719

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