Class: SDM::WorkflowRole

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

Overview

WorkflowRole links a Role to a Workflow.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of WorkflowRole.



9707
9708
9709
9710
9711
9712
9713
# File 'lib/models/porcelain.rb', line 9707

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

Instance Attribute Details

#role_idObject

The role id.



9703
9704
9705
# File 'lib/models/porcelain.rb', line 9703

def role_id
  @role_id
end

#workflow_idObject

The workflow id.



9705
9706
9707
# File 'lib/models/porcelain.rb', line 9705

def workflow_id
  @workflow_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9715
9716
9717
9718
9719
9720
9721
# File 'lib/models/porcelain.rb', line 9715

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