Class: DecisionAgent::Dmn::Decision
- Inherits:
-
Object
- Object
- DecisionAgent::Dmn::Decision
- Defined in:
- lib/decision_agent/dmn/model.rb
Overview
Represents a single decision element
Instance Attribute Summary collapse
-
#decision_table ⇒ Object
Returns the value of attribute decision_table.
-
#decision_tree ⇒ Object
Returns the value of attribute decision_tree.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#information_requirements ⇒ Object
readonly
Returns the value of attribute information_requirements.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #freeze ⇒ Object
-
#initialize(id:, name:, description: nil) ⇒ Decision
constructor
A new instance of Decision.
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_table ⇒ Object
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_tree ⇒ Object
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 |
#description ⇒ Object (readonly)
Returns the value of attribute description.
41 42 43 |
# File 'lib/decision_agent/dmn/model.rb', line 41 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
41 42 43 |
# File 'lib/decision_agent/dmn/model.rb', line 41 def id @id end |
#information_requirements ⇒ Object (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 |
#name ⇒ Object (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
#freeze ⇒ Object
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 |