Class: Expressir::Model::Statements::Case

Inherits:
Expressir::Model::Statement show all
Defined in:
lib/expressir/model/statements/case.rb

Overview

Specified in ISO 10303-11:2004

  • section 13.4 Case statement

Instance Attribute Summary collapse

Attributes inherited from ModelElement

#parent

Instance Method Summary collapse

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 = {}) ⇒ Case

Returns a new instance of Case.

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):



15
16
17
18
19
20
21
# File 'lib/expressir/model/statements/case.rb', line 15

def initialize(options = {})
  @expression = options[:expression]
  @actions = options[:actions] || []
  @otherwise_statement = options[:otherwise_statement]

  super
end

Instance Attribute Details

#actionsArray<CaseAction>

Returns:



8
# File 'lib/expressir/model/statements/case.rb', line 8

model_attr_accessor :actions, "Array<CaseAction>"

#expressionExpression

Returns:



7
# File 'lib/expressir/model/statements/case.rb', line 7

model_attr_accessor :expression, "Expression"

#otherwise_statementStatement

Returns:



9
# File 'lib/expressir/model/statements/case.rb', line 9

model_attr_accessor :otherwise_statement, "Statement"