Class: DecisionAgent::Dmn::Decision

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

Overview

Represents a single decision element

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, name:, description: nil) ⇒ Decision

Returns a new instance of Decision.



43
44
45
46
47
48
49
50
# File 'lib/decision_agent/dmn/model.rb', line 43

def initialize(id:, name:, description: nil)
  @id = id.to_s
  @name = name.to_s
  @description = description&.to_s
  @decision_table = nil
  @decision_tree = nil
  @information_requirements = []
end

Instance Attribute Details

#decision_tableObject

Returns the value of attribute decision_table.



41
42
43
# File 'lib/decision_agent/dmn/model.rb', line 41

def decision_table
  @decision_table
end

#decision_treeObject

Returns the value of attribute decision_tree.



40
41
42
# File 'lib/decision_agent/dmn/model.rb', line 40

def decision_tree
  @decision_tree
end

#descriptionObject (readonly)

Returns the value of attribute description.



41
42
43
# File 'lib/decision_agent/dmn/model.rb', line 41

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



41
42
43
# File 'lib/decision_agent/dmn/model.rb', line 41

def id
  @id
end

#information_requirementsObject (readonly)

Returns the value of attribute information_requirements.



41
42
43
# File 'lib/decision_agent/dmn/model.rb', line 41

def information_requirements
  @information_requirements
end

#nameObject (readonly)

Returns the value of attribute name.



41
42
43
# File 'lib/decision_agent/dmn/model.rb', line 41

def name
  @name
end

Instance Method Details

#freezeObject



58
59
60
61
62
63
64
65
66
# File 'lib/decision_agent/dmn/model.rb', line 58

def freeze
  @id.freeze
  @name.freeze
  @description.freeze
  @decision_table&.freeze
  @decision_tree&.freeze
  @information_requirements.freeze
  super
end