Class: Expressir::Model::Statements::Repeat

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

Overview

Specified in ISO 10303-11:2004

  • section 13.9 Repeat statement

Instance Attribute Summary collapse

Attributes included from Identifier

#id, #remark_items, #remarks, #source

Attributes inherited from ModelElement

#parent

Instance Method Summary collapse

Methods inherited from ModelElement

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

Returns a new instance of Repeat.

Parameters:

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

Options Hash (options):



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/expressir/model/statements/repeat.rb', line 24

def initialize(options = {})
  initialize_identifier(options)

  @bound1 = options[:bound1]
  @bound2 = options[:bound2]
  @increment = options[:increment]
  @while_expression = options[:while_expression]
  @until_expression = options[:until_expression]
  @statements = options[:statements] || []

  super
end

Instance Attribute Details

#bound1Expression

Returns:



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

model_attr_accessor :bound1, "Expression"

#bound2Expression

Returns:



10
# File 'lib/expressir/model/statements/repeat.rb', line 10

model_attr_accessor :bound2, "Expression"

#incrementExpression

Returns:



11
# File 'lib/expressir/model/statements/repeat.rb', line 11

model_attr_accessor :increment, "Expression"

#statementsArray<Statement>

Returns:



14
# File 'lib/expressir/model/statements/repeat.rb', line 14

model_attr_accessor :statements, "Array<Statement>"

#until_expressionExpression

Returns:



13
# File 'lib/expressir/model/statements/repeat.rb', line 13

model_attr_accessor :until_expression, "Expression"

#while_expressionExpression

Returns:



12
# File 'lib/expressir/model/statements/repeat.rb', line 12

model_attr_accessor :while_expression, "Expression"

Instance Method Details

#childrenArray<Declaration>

Returns:



38
39
40
41
42
43
# File 'lib/expressir/model/statements/repeat.rb', line 38

def children
  [
    self,
    *remark_items,
  ]
end