Class: SDM::WorkflowAssignment

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

Overview

WorkflowAssignment links a Resource to a Workflow. The assigned resources are those that a user can request access to via the workflow.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_id: nil, workflow_id: nil) ⇒ WorkflowAssignment

Returns a new instance of WorkflowAssignment.


15852
15853
15854
15855
15856
15857
15858
# File 'lib/models/porcelain.rb', line 15852

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

Instance Attribute Details

#resource_idObject

The resource id.


15848
15849
15850
# File 'lib/models/porcelain.rb', line 15848

def resource_id
  @resource_id
end

#workflow_idObject

The workflow id.


15850
15851
15852
# File 'lib/models/porcelain.rb', line 15850

def workflow_id
  @workflow_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object


15860
15861
15862
15863
15864
15865
15866
# File 'lib/models/porcelain.rb', line 15860

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