expressir 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -13
- data/.rubocop_todo.yml +69 -6
- data/Gemfile +1 -1
- data/README.adoc +46 -0
- data/exe/expressir-format-test +2 -1
- data/expressir.gemspec +2 -3
- data/lib/expressir/express/cache.rb +6 -6
- data/lib/expressir/express/formatter.rb +754 -741
- data/lib/expressir/express/hyperlink_formatter.rb +2 -2
- data/lib/expressir/express/model_visitor.rb +1 -1
- data/lib/expressir/express/parser.rb +224 -100
- data/lib/expressir/express/resolve_references_model_visitor.rb +6 -6
- data/lib/expressir/express/schema_head_formatter.rb +3 -3
- data/lib/expressir/express/visitor.rb +353 -344
- data/lib/expressir/model/cache.rb +3 -3
- data/lib/expressir/model/data_type.rb +1 -1
- data/lib/expressir/model/data_types/aggregate.rb +3 -3
- data/lib/expressir/model/data_types/array.rb +6 -6
- data/lib/expressir/model/data_types/bag.rb +4 -4
- data/lib/expressir/model/data_types/binary.rb +3 -3
- data/lib/expressir/model/data_types/boolean.rb +1 -1
- data/lib/expressir/model/data_types/enumeration.rb +4 -4
- data/lib/expressir/model/data_types/enumeration_item.rb +2 -2
- data/lib/expressir/model/data_types/generic.rb +2 -2
- data/lib/expressir/model/data_types/generic_entity.rb +2 -2
- data/lib/expressir/model/data_types/integer.rb +1 -1
- data/lib/expressir/model/data_types/list.rb +5 -5
- data/lib/expressir/model/data_types/logical.rb +1 -1
- data/lib/expressir/model/data_types/number.rb +1 -1
- data/lib/expressir/model/data_types/real.rb +2 -2
- data/lib/expressir/model/data_types/select.rb +5 -5
- data/lib/expressir/model/data_types/set.rb +4 -4
- data/lib/expressir/model/data_types/string.rb +3 -3
- data/lib/expressir/model/declaration.rb +1 -1
- data/lib/expressir/model/declarations/attribute.rb +7 -7
- data/lib/expressir/model/declarations/constant.rb +4 -4
- data/lib/expressir/model/declarations/entity.rb +9 -9
- data/lib/expressir/model/declarations/function.rb +13 -13
- data/lib/expressir/model/declarations/interface.rb +4 -4
- data/lib/expressir/model/declarations/interface_item.rb +3 -3
- data/lib/expressir/model/declarations/interfaced_item.rb +6 -6
- data/lib/expressir/model/declarations/parameter.rb +4 -4
- data/lib/expressir/model/declarations/procedure.rb +12 -12
- data/lib/expressir/model/declarations/remark_item.rb +3 -3
- data/lib/expressir/model/declarations/rule.rb +14 -14
- data/lib/expressir/model/declarations/schema.rb +18 -18
- data/lib/expressir/model/declarations/schema_version.rb +3 -3
- data/lib/expressir/model/declarations/schema_version_item.rb +3 -3
- data/lib/expressir/model/declarations/subtype_constraint.rb +6 -6
- data/lib/expressir/model/declarations/type.rb +5 -5
- data/lib/expressir/model/declarations/unique_rule.rb +3 -3
- data/lib/expressir/model/declarations/variable.rb +4 -4
- data/lib/expressir/model/declarations/where_rule.rb +3 -3
- data/lib/expressir/model/expression.rb +1 -1
- data/lib/expressir/model/expressions/aggregate_initializer.rb +2 -2
- data/lib/expressir/model/expressions/aggregate_initializer_item.rb +3 -3
- data/lib/expressir/model/expressions/binary_expression.rb +12 -5
- data/lib/expressir/model/expressions/entity_constructor.rb +3 -3
- data/lib/expressir/model/expressions/function_call.rb +3 -3
- data/lib/expressir/model/expressions/interval.rb +6 -6
- data/lib/expressir/model/expressions/query_expression.rb +4 -4
- data/lib/expressir/model/expressions/unary_expression.rb +3 -3
- data/lib/expressir/model/identifier.rb +5 -5
- data/lib/expressir/model/literal.rb +1 -1
- data/lib/expressir/model/literals/binary.rb +2 -2
- data/lib/expressir/model/literals/integer.rb +2 -2
- data/lib/expressir/model/literals/logical.rb +2 -2
- data/lib/expressir/model/literals/real.rb +2 -2
- data/lib/expressir/model/literals/string.rb +3 -3
- data/lib/expressir/model/model_element.rb +35 -41
- data/lib/expressir/model/reference.rb +1 -1
- data/lib/expressir/model/references/attribute_reference.rb +3 -3
- data/lib/expressir/model/references/group_reference.rb +3 -3
- data/lib/expressir/model/references/index_reference.rb +4 -4
- data/lib/expressir/model/references/simple_reference.rb +3 -3
- data/lib/expressir/model/repository.rb +3 -4
- data/lib/expressir/model/statement.rb +1 -1
- data/lib/expressir/model/statements/alias.rb +4 -4
- data/lib/expressir/model/statements/assignment.rb +3 -3
- data/lib/expressir/model/statements/case.rb +4 -4
- data/lib/expressir/model/statements/case_action.rb +3 -3
- data/lib/expressir/model/statements/compound.rb +2 -2
- data/lib/expressir/model/statements/escape.rb +1 -1
- data/lib/expressir/model/statements/if.rb +4 -4
- data/lib/expressir/model/statements/null.rb +1 -1
- data/lib/expressir/model/statements/procedure_call.rb +3 -3
- data/lib/expressir/model/statements/repeat.rb +8 -8
- data/lib/expressir/model/statements/return.rb +2 -2
- data/lib/expressir/model/statements/skip.rb +1 -1
- data/lib/expressir/model/supertype_expression.rb +1 -1
- data/lib/expressir/model/supertype_expressions/binary_supertype_expression.rb +4 -4
- data/lib/expressir/model/supertype_expressions/oneof_supertype_expression.rb +2 -2
- data/lib/expressir/version.rb +1 -1
- metadata +12 -12
@@ -4,19 +4,19 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 9.3 Schema
|
6
6
|
class Schema < Declaration
|
7
|
-
model_attr_accessor :file,
|
7
|
+
model_attr_accessor :file, "String"
|
8
8
|
|
9
9
|
include Identifier
|
10
10
|
|
11
|
-
model_attr_accessor :version,
|
12
|
-
model_attr_accessor :interfaces,
|
13
|
-
model_attr_accessor :constants,
|
14
|
-
model_attr_accessor :types,
|
15
|
-
model_attr_accessor :entities,
|
16
|
-
model_attr_accessor :subtype_constraints,
|
17
|
-
model_attr_accessor :functions,
|
18
|
-
model_attr_accessor :rules,
|
19
|
-
model_attr_accessor :procedures,
|
11
|
+
model_attr_accessor :version, "SchemaVersion"
|
12
|
+
model_attr_accessor :interfaces, "Array<Interface>"
|
13
|
+
model_attr_accessor :constants, "Array<Constant>"
|
14
|
+
model_attr_accessor :types, "Array<Type>"
|
15
|
+
model_attr_accessor :entities, "Array<Entity>"
|
16
|
+
model_attr_accessor :subtype_constraints, "Array<SubtypeConstraint>"
|
17
|
+
model_attr_accessor :functions, "Array<Function>"
|
18
|
+
model_attr_accessor :rules, "Array<Rule>"
|
19
|
+
model_attr_accessor :procedures, "Array<Procedure>"
|
20
20
|
|
21
21
|
# @param [Hash] options
|
22
22
|
# @option options [String] :file
|
@@ -53,13 +53,13 @@ module Expressir
|
|
53
53
|
[
|
54
54
|
*constants,
|
55
55
|
*types,
|
56
|
-
*types.flat_map
|
56
|
+
*types.flat_map(&:enumeration_items),
|
57
57
|
*entities,
|
58
58
|
*subtype_constraints,
|
59
59
|
*functions,
|
60
60
|
*rules,
|
61
61
|
*procedures,
|
62
|
-
*remark_items
|
62
|
+
*remark_items,
|
63
63
|
]
|
64
64
|
end
|
65
65
|
|
@@ -67,7 +67,7 @@ module Expressir
|
|
67
67
|
def children
|
68
68
|
[
|
69
69
|
*interfaced_items,
|
70
|
-
*safe_children
|
70
|
+
*safe_children,
|
71
71
|
]
|
72
72
|
end
|
73
73
|
|
@@ -78,7 +78,7 @@ module Expressir
|
|
78
78
|
# @return [InterfacedItem]
|
79
79
|
def create_interfaced_item(id, base_item)
|
80
80
|
interfaced_item = InterfacedItem.new(
|
81
|
-
id: id
|
81
|
+
id: id,
|
82
82
|
)
|
83
83
|
interfaced_item.base_item = base_item # skip overriding parent
|
84
84
|
interfaced_item.parent = self
|
@@ -93,8 +93,8 @@ module Expressir
|
|
93
93
|
schema = parent.children_by_id[interface.schema.id.safe_downcase]
|
94
94
|
if schema
|
95
95
|
schema_safe_children = schema.safe_children
|
96
|
-
schema_safe_children_by_id = schema_safe_children.select
|
97
|
-
if interface.items.length
|
96
|
+
schema_safe_children_by_id = schema_safe_children.select(&:id).map { |x| [x.id.safe_downcase, x] }.to_h
|
97
|
+
if interface.items.length.positive?
|
98
98
|
interface.items.map do |interface_item|
|
99
99
|
base_item = schema_safe_children_by_id[interface_item.ref.id.safe_downcase]
|
100
100
|
if base_item
|
@@ -109,9 +109,9 @@ module Expressir
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
end
|
112
|
-
end.select{|x| x}
|
112
|
+
end.select { |x| x }
|
113
113
|
end
|
114
114
|
end
|
115
115
|
end
|
116
116
|
end
|
117
|
-
end
|
117
|
+
end
|
@@ -4,8 +4,8 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 9.3 Schema
|
6
6
|
class SchemaVersion < ModelElement
|
7
|
-
model_attr_accessor :value,
|
8
|
-
model_attr_accessor :items,
|
7
|
+
model_attr_accessor :value, "String"
|
8
|
+
model_attr_accessor :items, "Array<SchemaVersionItem>"
|
9
9
|
|
10
10
|
# @param [Hash] options
|
11
11
|
# @option options [String] :value
|
@@ -19,4 +19,4 @@ module Expressir
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
@@ -4,8 +4,8 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 9.3 Schema
|
6
6
|
class SchemaVersionItem < ModelElement
|
7
|
-
model_attr_accessor :name,
|
8
|
-
model_attr_accessor :value,
|
7
|
+
model_attr_accessor :name, "String"
|
8
|
+
model_attr_accessor :value, "String"
|
9
9
|
|
10
10
|
# @param [Hash] options
|
11
11
|
# @option options [String] :name
|
@@ -19,4 +19,4 @@ module Expressir
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
@@ -6,10 +6,10 @@ module Expressir
|
|
6
6
|
class SubtypeConstraint < Declaration
|
7
7
|
include Identifier
|
8
8
|
|
9
|
-
model_attr_accessor :applies_to,
|
10
|
-
model_attr_accessor :abstract,
|
11
|
-
model_attr_accessor :total_over,
|
12
|
-
model_attr_accessor :supertype_expression,
|
9
|
+
model_attr_accessor :applies_to, "Reference"
|
10
|
+
model_attr_accessor :abstract, "Boolean"
|
11
|
+
model_attr_accessor :total_over, "Array<Reference>"
|
12
|
+
model_attr_accessor :supertype_expression, "SupertypeExpression"
|
13
13
|
|
14
14
|
# @param [Hash] options
|
15
15
|
# @option (see Identifier#initialize_identifier)
|
@@ -31,10 +31,10 @@ module Expressir
|
|
31
31
|
# @return [Array<Declaration>]
|
32
32
|
def children
|
33
33
|
[
|
34
|
-
*remark_items
|
34
|
+
*remark_items,
|
35
35
|
]
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
40
|
-
end
|
40
|
+
end
|
@@ -6,9 +6,9 @@ module Expressir
|
|
6
6
|
class Type < Declaration
|
7
7
|
include Identifier
|
8
8
|
|
9
|
-
model_attr_accessor :underlying_type,
|
10
|
-
model_attr_accessor :where_rules,
|
11
|
-
model_attr_accessor :informal_propositions,
|
9
|
+
model_attr_accessor :underlying_type, "DataType"
|
10
|
+
model_attr_accessor :where_rules, "Array<WhereRule>"
|
11
|
+
model_attr_accessor :informal_propositions, "Array<RemarkItem>"
|
12
12
|
|
13
13
|
# @param [Hash] options
|
14
14
|
# @option (see Identifier#initialize_identifier)
|
@@ -36,10 +36,10 @@ module Expressir
|
|
36
36
|
*enumeration_items,
|
37
37
|
*where_rules,
|
38
38
|
*informal_propositions,
|
39
|
-
*remark_items
|
39
|
+
*remark_items,
|
40
40
|
]
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
45
|
-
end
|
45
|
+
end
|
@@ -6,7 +6,7 @@ module Expressir
|
|
6
6
|
class UniqueRule < Declaration
|
7
7
|
include Identifier
|
8
8
|
|
9
|
-
model_attr_accessor :attributes,
|
9
|
+
model_attr_accessor :attributes, "Reference"
|
10
10
|
|
11
11
|
# @param [Hash] options
|
12
12
|
# @option (see Identifier#initialize_identifier)
|
@@ -22,10 +22,10 @@ module Expressir
|
|
22
22
|
# @return [Array<Declaration>]
|
23
23
|
def children
|
24
24
|
[
|
25
|
-
*remark_items
|
25
|
+
*remark_items,
|
26
26
|
]
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
31
|
-
end
|
31
|
+
end
|
@@ -6,8 +6,8 @@ module Expressir
|
|
6
6
|
class Variable < Declaration
|
7
7
|
include Identifier
|
8
8
|
|
9
|
-
model_attr_accessor :type,
|
10
|
-
model_attr_accessor :expression,
|
9
|
+
model_attr_accessor :type, "DataType"
|
10
|
+
model_attr_accessor :expression, "Expression"
|
11
11
|
|
12
12
|
# @param [Hash] options
|
13
13
|
# @option (see Identifier#initialize_identifier)
|
@@ -25,10 +25,10 @@ module Expressir
|
|
25
25
|
# @return [Array<Declaration>]
|
26
26
|
def children
|
27
27
|
[
|
28
|
-
*remark_items
|
28
|
+
*remark_items,
|
29
29
|
]
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
34
|
-
end
|
34
|
+
end
|
@@ -6,7 +6,7 @@ module Expressir
|
|
6
6
|
class WhereRule < Declaration
|
7
7
|
include Identifier
|
8
8
|
|
9
|
-
model_attr_accessor :expression,
|
9
|
+
model_attr_accessor :expression, "Expression"
|
10
10
|
|
11
11
|
# @param [Hash] options
|
12
12
|
# @option (see Identifier#initialize_identifier)
|
@@ -22,10 +22,10 @@ module Expressir
|
|
22
22
|
# @return [Array<Declaration>]
|
23
23
|
def children
|
24
24
|
[
|
25
|
-
*remark_items
|
25
|
+
*remark_items,
|
26
26
|
]
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
31
|
-
end
|
31
|
+
end
|
@@ -4,7 +4,7 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 12.9 Aggregate initializer
|
6
6
|
class AggregateInitializer < Expression
|
7
|
-
model_attr_accessor :items,
|
7
|
+
model_attr_accessor :items, "Array<AggregateInitializerItem>"
|
8
8
|
|
9
9
|
# @param [Hash] options
|
10
10
|
# @option options [Array<AggregateInitializerItem>] :items
|
@@ -16,4 +16,4 @@ module Expressir
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
19
|
-
end
|
19
|
+
end
|
@@ -4,8 +4,8 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 12.9 Aggregate initializer
|
6
6
|
class AggregateInitializerItem < Expression
|
7
|
-
model_attr_accessor :expression,
|
8
|
-
model_attr_accessor :repetition,
|
7
|
+
model_attr_accessor :expression, "Expression"
|
8
|
+
model_attr_accessor :repetition, "Expression"
|
9
9
|
|
10
10
|
# @param [Hash] options
|
11
11
|
# @option options [Expression] :expression
|
@@ -19,4 +19,4 @@ module Expressir
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
@@ -32,12 +32,19 @@ module Expressir
|
|
32
32
|
SUBTRACTION = :SUBTRACTION
|
33
33
|
XOR = :XOR
|
34
34
|
|
35
|
-
model_attr_accessor :operator,
|
36
|
-
|
37
|
-
|
35
|
+
model_attr_accessor :operator,
|
36
|
+
":ADDITION, :AND, :COMBINE, :EQUAL, :EXPONENTIATION, :GREATER_THAN, \
|
37
|
+
:GREATER_THAN_OR_EQUAL, :IN, :INSTANCE_EQUAL, :INSTANCE_NOT_EQUAL, \
|
38
|
+
:INTEGER_DIVISION, :LESS_THAN, :LESS_THAN_OR_EQUAL, :LIKE, :MODULO,\
|
39
|
+
:MULTIPLICATION, :NOT_EQUAL, :OR, :REAL_DIVISION, :SUBTRACTION, :XOR"
|
40
|
+
model_attr_accessor :operand1, "Expression"
|
41
|
+
model_attr_accessor :operand2, "Expression"
|
38
42
|
|
39
43
|
# @param [Hash] options
|
40
|
-
# @option options [:ADDITION, :AND, :COMBINE, :EQUAL, :EXPONENTIATION, :GREATER_THAN,
|
44
|
+
# @option options [:ADDITION, :AND, :COMBINE, :EQUAL, :EXPONENTIATION, :GREATER_THAN,
|
45
|
+
# :GREATER_THAN_OR_EQUAL, :IN, :INSTANCE_EQUAL, :INSTANCE_NOT_EQUAL,
|
46
|
+
# :INTEGER_DIVISION, :LESS_THAN, :LESS_THAN_OR_EQUAL, :LIKE, :MODULO,
|
47
|
+
# :MULTIPLICATION, :NOT_EQUAL, :OR, :REAL_DIVISION, :SUBTRACTION, :XOR] :operator
|
41
48
|
# @option options [Expression] :operand1
|
42
49
|
# @option options [Expression] :operand2
|
43
50
|
def initialize(options = {})
|
@@ -50,4 +57,4 @@ module Expressir
|
|
50
57
|
end
|
51
58
|
end
|
52
59
|
end
|
53
|
-
end
|
60
|
+
end
|
@@ -4,8 +4,8 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 9.2.6 Implicit declarations
|
6
6
|
class EntityConstructor < Expression
|
7
|
-
model_attr_accessor :entity,
|
8
|
-
model_attr_accessor :parameters,
|
7
|
+
model_attr_accessor :entity, "Reference"
|
8
|
+
model_attr_accessor :parameters, "Array<Expression>"
|
9
9
|
|
10
10
|
# @param [Hash] options
|
11
11
|
# @option options [Reference] :entity
|
@@ -19,4 +19,4 @@ module Expressir
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
@@ -4,8 +4,8 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 12.8 Function call
|
6
6
|
class FunctionCall < Expression
|
7
|
-
model_attr_accessor :function,
|
8
|
-
model_attr_accessor :parameters,
|
7
|
+
model_attr_accessor :function, "Reference"
|
8
|
+
model_attr_accessor :parameters, "Array<Expression>"
|
9
9
|
|
10
10
|
# @param [Hash] options
|
11
11
|
# @option options [Reference] :function
|
@@ -19,4 +19,4 @@ module Expressir
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
@@ -7,11 +7,11 @@ module Expressir
|
|
7
7
|
LESS_THAN = :LESS_THAN
|
8
8
|
LESS_THAN_OR_EQUAL = :LESS_THAN_OR_EQUAL
|
9
9
|
|
10
|
-
model_attr_accessor :low,
|
11
|
-
model_attr_accessor :operator1,
|
12
|
-
model_attr_accessor :item,
|
13
|
-
model_attr_accessor :operator2,
|
14
|
-
model_attr_accessor :high,
|
10
|
+
model_attr_accessor :low, "Expression"
|
11
|
+
model_attr_accessor :operator1, ":LESS_THAN, :LESS_THAN_OR_EQUAL"
|
12
|
+
model_attr_accessor :item, "Reference"
|
13
|
+
model_attr_accessor :operator2, ":LESS_THAN, :LESS_THAN_OR_EQUAL"
|
14
|
+
model_attr_accessor :high, "Expression"
|
15
15
|
|
16
16
|
# @param [Hash] options
|
17
17
|
# @option options [Expression] :low
|
@@ -31,4 +31,4 @@ module Expressir
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
34
|
-
end
|
34
|
+
end
|
@@ -6,8 +6,8 @@ module Expressir
|
|
6
6
|
class QueryExpression < Expression
|
7
7
|
include Identifier
|
8
8
|
|
9
|
-
model_attr_accessor :aggregate_source,
|
10
|
-
model_attr_accessor :expression,
|
9
|
+
model_attr_accessor :aggregate_source, "Reference"
|
10
|
+
model_attr_accessor :expression, "Expression"
|
11
11
|
|
12
12
|
# @param [Hash] options
|
13
13
|
# @option (see Identifier#initialize_identifier)
|
@@ -26,10 +26,10 @@ module Expressir
|
|
26
26
|
def children
|
27
27
|
[
|
28
28
|
self,
|
29
|
-
*remark_items
|
29
|
+
*remark_items,
|
30
30
|
]
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
35
|
-
end
|
35
|
+
end
|
@@ -9,8 +9,8 @@ module Expressir
|
|
9
9
|
NOT = :NOT
|
10
10
|
PLUS = :PLUS
|
11
11
|
|
12
|
-
model_attr_accessor :operator,
|
13
|
-
model_attr_accessor :operand,
|
12
|
+
model_attr_accessor :operator, ":MINUS, :NOT, :PLUS"
|
13
|
+
model_attr_accessor :operand, "Expression"
|
14
14
|
|
15
15
|
# @param [Hash] options
|
16
16
|
# @option options [:MINUS, :NOT, :PLUS] :operator
|
@@ -24,4 +24,4 @@ module Expressir
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
27
|
-
end
|
27
|
+
end
|
@@ -11,10 +11,10 @@ module Expressir
|
|
11
11
|
# @return [::String]
|
12
12
|
# @!visibility private
|
13
13
|
def self.included(mod)
|
14
|
-
mod.model_attr_accessor :id,
|
15
|
-
mod.model_attr_accessor :remarks,
|
16
|
-
mod.model_attr_accessor :remark_items,
|
17
|
-
mod.model_attr_accessor :source,
|
14
|
+
mod.model_attr_accessor :id, "::String"
|
15
|
+
mod.model_attr_accessor :remarks, "::Array<::String>"
|
16
|
+
mod.model_attr_accessor :remark_items, "::Array<RemarkItem>"
|
17
|
+
mod.model_attr_accessor :source, "::String"
|
18
18
|
end
|
19
19
|
|
20
20
|
# @param [Hash] options
|
@@ -31,4 +31,4 @@ module Expressir
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
34
|
-
end
|
34
|
+
end
|
@@ -4,7 +4,7 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 7.5.1 Binary literal
|
6
6
|
class Binary < Literal
|
7
|
-
model_attr_accessor :value,
|
7
|
+
model_attr_accessor :value, "::String"
|
8
8
|
|
9
9
|
# @param [Hash] options
|
10
10
|
# @option options [::String] :value
|
@@ -16,4 +16,4 @@ module Expressir
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
19
|
-
end
|
19
|
+
end
|
@@ -4,7 +4,7 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 7.5.2 Integer literal
|
6
6
|
class Integer < Literal
|
7
|
-
model_attr_accessor :value,
|
7
|
+
model_attr_accessor :value, "::String"
|
8
8
|
|
9
9
|
# @param [Hash] options
|
10
10
|
# @option options [::String] :value
|
@@ -16,4 +16,4 @@ module Expressir
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
19
|
-
end
|
19
|
+
end
|
@@ -8,7 +8,7 @@ module Expressir
|
|
8
8
|
FALSE = :FALSE
|
9
9
|
UNKNOWN = :UNKNOWN
|
10
10
|
|
11
|
-
model_attr_accessor :value,
|
11
|
+
model_attr_accessor :value, ":TRUE, :FALSE, :UNKNOWN"
|
12
12
|
|
13
13
|
# @param [Hash] options
|
14
14
|
# @option options [:TRUE, :FALSE, :UNKNOWN] :value
|
@@ -20,4 +20,4 @@ module Expressir
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
23
|
-
end
|
23
|
+
end
|
@@ -4,7 +4,7 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 7.5.3 Real literal
|
6
6
|
class Real < Literal
|
7
|
-
model_attr_accessor :value,
|
7
|
+
model_attr_accessor :value, "::String"
|
8
8
|
|
9
9
|
# @param [Hash] options
|
10
10
|
# @option options [::String] :value
|
@@ -16,4 +16,4 @@ module Expressir
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
19
|
-
end
|
19
|
+
end
|
@@ -4,8 +4,8 @@ module Expressir
|
|
4
4
|
# Specified in ISO 10303-11:2004
|
5
5
|
# - section 7.5.4 String literal
|
6
6
|
class String < Literal
|
7
|
-
model_attr_accessor :value,
|
8
|
-
model_attr_accessor :encoded,
|
7
|
+
model_attr_accessor :value, "::String"
|
8
|
+
model_attr_accessor :encoded, "::Boolean"
|
9
9
|
|
10
10
|
# @param [Hash] options
|
11
11
|
# @option options [::String] :value
|
@@ -19,4 +19,4 @@ module Expressir
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|