Class: Expressir::Model::DataTypes::Enumeration

Inherits:
Expressir::Model::DataType show all
Defined in:
lib/expressir/model/data_types/enumeration.rb

Overview

Specified in ISO 10303-11:2004

  • section 8.4.1 Enumeration data type

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

Returns a new instance of Enumeration.

Parameters:

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

Options Hash (options):



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

def initialize(options = {})
  @extensible = options[:extensible]
  @based_on = options[:based_on]
  @items = options[:items] || []

  super
end

Instance Attribute Details

#based_onReference

Returns:



8
# File 'lib/expressir/model/data_types/enumeration.rb', line 8

model_attr_accessor :based_on, "Reference"

#extensible::Boolean

Returns:

  • (::Boolean)


7
# File 'lib/expressir/model/data_types/enumeration.rb', line 7

model_attr_accessor :extensible, "::Boolean"

#items::Array<EnumerationItem>

Returns:



9
# File 'lib/expressir/model/data_types/enumeration.rb', line 9

model_attr_accessor :items, "::Array<EnumerationItem>"