Class: Expressir::Model::Declarations::Type
- Inherits:
-
Expressir::Model::Declaration
- Object
- ModelElement
- Expressir::Model::Declaration
- Expressir::Model::Declarations::Type
- Includes:
- Identifier
- Defined in:
- lib/expressir/model/declarations/type.rb
Overview
Specified in ISO 10303-11:2004
-
section 9.1 Type declaration
Instance Attribute Summary collapse
- #informal_propositions ⇒ Array<RemarkItem>
- #underlying_type ⇒ DataType
- #where_rules ⇒ Array<WhereRule>
Attributes included from Identifier
#id, #remark_items, #remarks, #source
Attributes inherited from ModelElement
Instance Method Summary collapse
- #children ⇒ Array<Declaration>
- #enumeration_items ⇒ Array<DataTypes::EnumerationItem>
-
#initialize(options = {}) ⇒ Type
constructor
A new instance of Type.
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 = {}) ⇒ Type
Returns a new instance of Type.
18 19 20 21 22 23 24 25 26 |
# File 'lib/expressir/model/declarations/type.rb', line 18 def initialize( = {}) initialize_identifier() @underlying_type = [:underlying_type] @where_rules = [:where_rules] || [] @informal_propositions = [:informal_propositions] || [] super end |
Instance Attribute Details
#informal_propositions ⇒ Array<RemarkItem>
11 |
# File 'lib/expressir/model/declarations/type.rb', line 11 model_attr_accessor :informal_propositions, "Array<RemarkItem>" |
#underlying_type ⇒ DataType
9 |
# File 'lib/expressir/model/declarations/type.rb', line 9 model_attr_accessor :underlying_type, "DataType" |
#where_rules ⇒ Array<WhereRule>
10 |
# File 'lib/expressir/model/declarations/type.rb', line 10 model_attr_accessor :where_rules, "Array<WhereRule>" |
Instance Method Details
#children ⇒ Array<Declaration>
34 35 36 37 38 39 40 41 |
# File 'lib/expressir/model/declarations/type.rb', line 34 def children [ *enumeration_items, *where_rules, *informal_propositions, *remark_items, ] end |
#enumeration_items ⇒ Array<DataTypes::EnumerationItem>
29 30 31 |
# File 'lib/expressir/model/declarations/type.rb', line 29 def enumeration_items .is_a?(DataTypes::Enumeration) ? .items : [] end |