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



9805
9806
9807
9808
9809
9810
9811
# File 'lib/models/porcelain.rb', line 9805

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.



9801
9802
9803
# File 'lib/models/porcelain.rb', line 9801

def role_id
  @role_id
end

#workflow_idObject

The workflow id.



9803
9804
9805
# File 'lib/models/porcelain.rb', line 9803

def workflow_id
  @workflow_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9813
9814
9815
9816
9817
9818
9819
# File 'lib/models/porcelain.rb', line 9813

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