Class: DrgDSL::Ast::SrglrbTableCondition
- Inherits:
-
Object
- Object
- DrgDSL::Ast::SrglrbTableCondition
- Includes:
- Node
- Defined in:
- lib/drgdsl/ast.rb
Overview
INFO: srg (prozedur) l (links) r (rechts) b(beidseitig)
Instance Attribute Summary collapse
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#variable ⇒ Object
readonly
Returns the value of attribute variable.
Instance Method Summary collapse
- #hash ⇒ Object
-
#initialize(variable:, condition:) ⇒ SrglrbTableCondition
constructor
A new instance of SrglrbTableCondition.
- #to_hash ⇒ Object
Methods included from Node
#==, #accept, included, #mdc_equality?, node_classes, #pretty_print, #sep_equality?, type, #type
Constructor Details
#initialize(variable:, condition:) ⇒ SrglrbTableCondition
Returns a new instance of SrglrbTableCondition.
350 351 352 353 |
# File 'lib/drgdsl/ast.rb', line 350 def initialize(variable:, condition:) @variable = variable @condition = condition end |
Instance Attribute Details
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
348 349 350 |
# File 'lib/drgdsl/ast.rb', line 348 def condition @condition end |
#variable ⇒ Object (readonly)
Returns the value of attribute variable.
348 349 350 |
# File 'lib/drgdsl/ast.rb', line 348 def variable @variable end |
Instance Method Details
#hash ⇒ Object
364 365 366 |
# File 'lib/drgdsl/ast.rb', line 364 def hash @hash ||= [type, variable, condition].hash end |
#to_hash ⇒ Object
355 356 357 358 359 360 361 362 |
# File 'lib/drgdsl/ast.rb', line 355 def to_hash { srglrb_table_condition: { var: variable.to_hash, condition: condition.to_hash } } end |