Class: SpotFeel::Dmn::Input
- Inherits:
-
Object
- Object
- SpotFeel::Dmn::Input
- Defined in:
- lib/spot_feel/dmn/input.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#input_expression ⇒ Object
readonly
Returns the value of attribute input_expression.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Class Method Summary collapse
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(id:, label:, input_expression:) ⇒ Input
constructor
A new instance of Input.
Constructor Details
#initialize(id:, label:, input_expression:) ⇒ Input
Returns a new instance of Input.
13 14 15 16 17 |
# File 'lib/spot_feel/dmn/input.rb', line 13 def initialize(id:, label:, input_expression:) @id = id @label = label @input_expression = input_expression end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/spot_feel/dmn/input.rb', line 6 def id @id end |
#input_expression ⇒ Object (readonly)
Returns the value of attribute input_expression.
6 7 8 |
# File 'lib/spot_feel/dmn/input.rb', line 6 def input_expression @input_expression end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
6 7 8 |
# File 'lib/spot_feel/dmn/input.rb', line 6 def label @label end |
Class Method Details
.from_json(json) ⇒ Object
8 9 10 11 |
# File 'lib/spot_feel/dmn/input.rb', line 8 def self.from_json(json) input_expression = LiteralExpression.from_json(json[:input_expression]) if json[:input_expression] Input.new(id: json[:id], label: json[:label], input_expression:) end |
Instance Method Details
#as_json ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/spot_feel/dmn/input.rb', line 19 def as_json { id: id, label: label, input_expression: input_expression.as_json, } end |