Class: DecisionAgent::Dmn::Input

Inherits:
Object
  • Object
show all
Defined in:
lib/decision_agent/dmn/model.rb

Overview

Input clause (column) in decision table

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, label:, expression: nil, type_ref: "string") ⇒ Input

Returns a new instance of Input.



129
130
131
132
133
134
# File 'lib/decision_agent/dmn/model.rb', line 129

def initialize(id:, label:, expression: nil, type_ref: "string")
  @id = id.to_s
  @label = label.to_s
  @expression = expression&.to_s || label.to_s
  @type_ref = type_ref.to_s
end

Instance Attribute Details

#expressionObject (readonly)

Returns the value of attribute expression.



127
128
129
# File 'lib/decision_agent/dmn/model.rb', line 127

def expression
  @expression
end

#idObject (readonly)

Returns the value of attribute id.



127
128
129
# File 'lib/decision_agent/dmn/model.rb', line 127

def id
  @id
end

#labelObject (readonly)

Returns the value of attribute label.



127
128
129
# File 'lib/decision_agent/dmn/model.rb', line 127

def label
  @label
end

#type_refObject (readonly)

Returns the value of attribute type_ref.



127
128
129
# File 'lib/decision_agent/dmn/model.rb', line 127

def type_ref
  @type_ref
end

Instance Method Details

#freezeObject



136
137
138
139
140
141
142
# File 'lib/decision_agent/dmn/model.rb', line 136

def freeze
  @id.freeze
  @label.freeze
  @expression.freeze
  @type_ref.freeze
  super
end