Class: Expressir::Model::Statements::If
- Inherits:
-
Expressir::Model::Statement
- Object
- ModelElement
- Expressir::Model::Statement
- Expressir::Model::Statements::If
- Defined in:
- lib/expressir/model/statements/if.rb
Overview
Specified in ISO 10303-11:2004
-
section 13.7 If … Then … Else statement
Instance Attribute Summary collapse
Attributes inherited from ModelElement
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ If
constructor
A new instance of If.
Methods inherited from ModelElement
#children, #children_by_id, #find, from_hash, model_attr_accessor, model_attrs, #path, #reset_children_by_id, #to_hash, #to_liquid, #to_s
Constructor Details
#initialize(options = {}) ⇒ If
Returns a new instance of If.
15 16 17 18 19 20 21 |
# File 'lib/expressir/model/statements/if.rb', line 15 def initialize( = {}) @expression = [:expression] @statements = [:statements] || [] @else_statements = [:else_statements] || [] super end |
Instance Attribute Details
#else_statements ⇒ Array<Statement>
9 |
# File 'lib/expressir/model/statements/if.rb', line 9 model_attr_accessor :else_statements, 'Array<Statement>' |
#expression ⇒ Expression
7 |
# File 'lib/expressir/model/statements/if.rb', line 7 model_attr_accessor :expression, 'Expression' |
#statements ⇒ Array<Statement>
8 |
# File 'lib/expressir/model/statements/if.rb', line 8 model_attr_accessor :statements, 'Array<Statement>' |