Class: Expressir::Model::Declarations::SubtypeConstraint

Inherits:
Expressir::Model::Declaration show all
Includes:
Identifier
Defined in:
lib/expressir/model/declarations/subtype_constraint.rb

Overview

Specified in ISO 10303-11:2004

  • section 9.7 Subtype constraints

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

Returns a new instance of SubtypeConstraint.

Parameters:

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

Options Hash (options):



20
21
22
23
24
25
26
27
28
29
# File 'lib/expressir/model/declarations/subtype_constraint.rb', line 20

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

  @applies_to = options[:applies_to]
  @abstract = options[:abstract]
  @total_over = options[:total_over] || []
  @supertype_expression = options[:supertype_expression]

  super
end

Instance Attribute Details

#abstractBoolean

Returns:

  • (Boolean)


10
# File 'lib/expressir/model/declarations/subtype_constraint.rb', line 10

model_attr_accessor :abstract, 'Boolean'

#applies_toReference

Returns:



9
# File 'lib/expressir/model/declarations/subtype_constraint.rb', line 9

model_attr_accessor :applies_to, 'Reference'

#supertype_expressionSupertypeExpression

Returns:



12
# File 'lib/expressir/model/declarations/subtype_constraint.rb', line 12

model_attr_accessor :supertype_expression, 'SupertypeExpression'

#total_overArray<Reference>

Returns:



11
# File 'lib/expressir/model/declarations/subtype_constraint.rb', line 11

model_attr_accessor :total_over, 'Array<Reference>'

Instance Method Details

#childrenArray<Declaration>

Returns:



32
33
34
35
36
# File 'lib/expressir/model/declarations/subtype_constraint.rb', line 32

def children
  [
    *remark_items
  ]
end