expressir 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +8 -13
  3. data/.rubocop_todo.yml +69 -6
  4. data/Gemfile +1 -1
  5. data/README.adoc +46 -0
  6. data/exe/expressir-format-test +2 -1
  7. data/expressir.gemspec +2 -3
  8. data/lib/expressir/express/cache.rb +6 -6
  9. data/lib/expressir/express/formatter.rb +754 -741
  10. data/lib/expressir/express/hyperlink_formatter.rb +2 -2
  11. data/lib/expressir/express/model_visitor.rb +1 -1
  12. data/lib/expressir/express/parser.rb +224 -100
  13. data/lib/expressir/express/resolve_references_model_visitor.rb +6 -6
  14. data/lib/expressir/express/schema_head_formatter.rb +3 -3
  15. data/lib/expressir/express/visitor.rb +353 -344
  16. data/lib/expressir/model/cache.rb +3 -3
  17. data/lib/expressir/model/data_type.rb +1 -1
  18. data/lib/expressir/model/data_types/aggregate.rb +3 -3
  19. data/lib/expressir/model/data_types/array.rb +6 -6
  20. data/lib/expressir/model/data_types/bag.rb +4 -4
  21. data/lib/expressir/model/data_types/binary.rb +3 -3
  22. data/lib/expressir/model/data_types/boolean.rb +1 -1
  23. data/lib/expressir/model/data_types/enumeration.rb +4 -4
  24. data/lib/expressir/model/data_types/enumeration_item.rb +2 -2
  25. data/lib/expressir/model/data_types/generic.rb +2 -2
  26. data/lib/expressir/model/data_types/generic_entity.rb +2 -2
  27. data/lib/expressir/model/data_types/integer.rb +1 -1
  28. data/lib/expressir/model/data_types/list.rb +5 -5
  29. data/lib/expressir/model/data_types/logical.rb +1 -1
  30. data/lib/expressir/model/data_types/number.rb +1 -1
  31. data/lib/expressir/model/data_types/real.rb +2 -2
  32. data/lib/expressir/model/data_types/select.rb +5 -5
  33. data/lib/expressir/model/data_types/set.rb +4 -4
  34. data/lib/expressir/model/data_types/string.rb +3 -3
  35. data/lib/expressir/model/declaration.rb +1 -1
  36. data/lib/expressir/model/declarations/attribute.rb +7 -7
  37. data/lib/expressir/model/declarations/constant.rb +4 -4
  38. data/lib/expressir/model/declarations/entity.rb +9 -9
  39. data/lib/expressir/model/declarations/function.rb +13 -13
  40. data/lib/expressir/model/declarations/interface.rb +4 -4
  41. data/lib/expressir/model/declarations/interface_item.rb +3 -3
  42. data/lib/expressir/model/declarations/interfaced_item.rb +6 -6
  43. data/lib/expressir/model/declarations/parameter.rb +4 -4
  44. data/lib/expressir/model/declarations/procedure.rb +12 -12
  45. data/lib/expressir/model/declarations/remark_item.rb +3 -3
  46. data/lib/expressir/model/declarations/rule.rb +14 -14
  47. data/lib/expressir/model/declarations/schema.rb +18 -18
  48. data/lib/expressir/model/declarations/schema_version.rb +3 -3
  49. data/lib/expressir/model/declarations/schema_version_item.rb +3 -3
  50. data/lib/expressir/model/declarations/subtype_constraint.rb +6 -6
  51. data/lib/expressir/model/declarations/type.rb +5 -5
  52. data/lib/expressir/model/declarations/unique_rule.rb +3 -3
  53. data/lib/expressir/model/declarations/variable.rb +4 -4
  54. data/lib/expressir/model/declarations/where_rule.rb +3 -3
  55. data/lib/expressir/model/expression.rb +1 -1
  56. data/lib/expressir/model/expressions/aggregate_initializer.rb +2 -2
  57. data/lib/expressir/model/expressions/aggregate_initializer_item.rb +3 -3
  58. data/lib/expressir/model/expressions/binary_expression.rb +12 -5
  59. data/lib/expressir/model/expressions/entity_constructor.rb +3 -3
  60. data/lib/expressir/model/expressions/function_call.rb +3 -3
  61. data/lib/expressir/model/expressions/interval.rb +6 -6
  62. data/lib/expressir/model/expressions/query_expression.rb +4 -4
  63. data/lib/expressir/model/expressions/unary_expression.rb +3 -3
  64. data/lib/expressir/model/identifier.rb +5 -5
  65. data/lib/expressir/model/literal.rb +1 -1
  66. data/lib/expressir/model/literals/binary.rb +2 -2
  67. data/lib/expressir/model/literals/integer.rb +2 -2
  68. data/lib/expressir/model/literals/logical.rb +2 -2
  69. data/lib/expressir/model/literals/real.rb +2 -2
  70. data/lib/expressir/model/literals/string.rb +3 -3
  71. data/lib/expressir/model/model_element.rb +35 -41
  72. data/lib/expressir/model/reference.rb +1 -1
  73. data/lib/expressir/model/references/attribute_reference.rb +3 -3
  74. data/lib/expressir/model/references/group_reference.rb +3 -3
  75. data/lib/expressir/model/references/index_reference.rb +4 -4
  76. data/lib/expressir/model/references/simple_reference.rb +3 -3
  77. data/lib/expressir/model/repository.rb +3 -4
  78. data/lib/expressir/model/statement.rb +1 -1
  79. data/lib/expressir/model/statements/alias.rb +4 -4
  80. data/lib/expressir/model/statements/assignment.rb +3 -3
  81. data/lib/expressir/model/statements/case.rb +4 -4
  82. data/lib/expressir/model/statements/case_action.rb +3 -3
  83. data/lib/expressir/model/statements/compound.rb +2 -2
  84. data/lib/expressir/model/statements/escape.rb +1 -1
  85. data/lib/expressir/model/statements/if.rb +4 -4
  86. data/lib/expressir/model/statements/null.rb +1 -1
  87. data/lib/expressir/model/statements/procedure_call.rb +3 -3
  88. data/lib/expressir/model/statements/repeat.rb +8 -8
  89. data/lib/expressir/model/statements/return.rb +2 -2
  90. data/lib/expressir/model/statements/skip.rb +1 -1
  91. data/lib/expressir/model/supertype_expression.rb +1 -1
  92. data/lib/expressir/model/supertype_expressions/binary_supertype_expression.rb +4 -4
  93. data/lib/expressir/model/supertype_expressions/oneof_supertype_expression.rb +2 -2
  94. data/lib/expressir/version.rb +1 -1
  95. metadata +12 -12
@@ -2,8 +2,8 @@ module Expressir
2
2
  module Model
3
3
  # Cache content object with Expressir version
4
4
  class Cache < ModelElement
5
- model_attr_accessor :version, 'String'
6
- model_attr_accessor :content, 'ModelElement'
5
+ model_attr_accessor :version, "String"
6
+ model_attr_accessor :content, "ModelElement"
7
7
 
8
8
  # @param [Hash] options
9
9
  # @option options [String] :version
@@ -14,4 +14,4 @@ module Expressir
14
14
  end
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -6,4 +6,4 @@ module Expressir
6
6
  class DataType < ModelElement
7
7
  end
8
8
  end
9
- end
9
+ end
@@ -6,7 +6,7 @@ module Expressir
6
6
  class Aggregate < DataType
7
7
  include Identifier
8
8
 
9
- model_attr_accessor :base_type, 'Type'
9
+ model_attr_accessor :base_type, "Type"
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,11 +4,11 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 8.2.1 Array data type
6
6
  class Array < DataType
7
- model_attr_accessor :bound1, 'Expression'
8
- model_attr_accessor :bound2, 'Expression'
9
- model_attr_accessor :optional, '::Boolean'
10
- model_attr_accessor :unique, '::Boolean'
11
- model_attr_accessor :base_type, 'DataType'
7
+ model_attr_accessor :bound1, "Expression"
8
+ model_attr_accessor :bound2, "Expression"
9
+ model_attr_accessor :optional, "::Boolean"
10
+ model_attr_accessor :unique, "::Boolean"
11
+ model_attr_accessor :base_type, "DataType"
12
12
 
13
13
  # @param [Hash] options
14
14
  # @option options [Expression] :bound1
@@ -28,4 +28,4 @@ module Expressir
28
28
  end
29
29
  end
30
30
  end
31
- end
31
+ end
@@ -4,9 +4,9 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 8.2.3 Bag data type
6
6
  class Bag < DataType
7
- model_attr_accessor :bound1, 'Expression'
8
- model_attr_accessor :bound2, 'Expression'
9
- model_attr_accessor :base_type, 'DataType'
7
+ model_attr_accessor :bound1, "Expression"
8
+ model_attr_accessor :bound2, "Expression"
9
+ model_attr_accessor :base_type, "DataType"
10
10
 
11
11
  # @param [Hash] options
12
12
  # @option options [Expression] :bound1
@@ -22,4 +22,4 @@ module Expressir
22
22
  end
23
23
  end
24
24
  end
25
- end
25
+ end
@@ -4,8 +4,8 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 8.1.7 Binary data type
6
6
  class Binary < DataType
7
- model_attr_accessor :width, 'Expression'
8
- model_attr_accessor :fixed, '::Boolean'
7
+ model_attr_accessor :width, "Expression"
8
+ model_attr_accessor :fixed, "::Boolean"
9
9
 
10
10
  # @param [Hash] options
11
11
  # @option options [Expression] :width
@@ -19,4 +19,4 @@ module Expressir
19
19
  end
20
20
  end
21
21
  end
22
- end
22
+ end
@@ -7,4 +7,4 @@ module Expressir
7
7
  end
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -4,9 +4,9 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 8.4.1 Enumeration data type
6
6
  class Enumeration < DataType
7
- model_attr_accessor :extensible, '::Boolean'
8
- model_attr_accessor :based_on, 'Reference'
9
- model_attr_accessor :items, '::Array<EnumerationItem>'
7
+ model_attr_accessor :extensible, "::Boolean"
8
+ model_attr_accessor :based_on, "Reference"
9
+ model_attr_accessor :items, "::Array<EnumerationItem>"
10
10
 
11
11
  # @param [Hash] options
12
12
  # @option options [::Boolean] :extensible
@@ -22,4 +22,4 @@ module Expressir
22
22
  end
23
23
  end
24
24
  end
25
- end
25
+ end
@@ -17,10 +17,10 @@ module Expressir
17
17
  # @return [Array<Declaration>]
18
18
  def children
19
19
  [
20
- *remark_items
20
+ *remark_items,
21
21
  ]
22
22
  end
23
23
  end
24
24
  end
25
25
  end
26
- end
26
+ end
@@ -17,10 +17,10 @@ module Expressir
17
17
  # @return [Array<Declaration>]
18
18
  def children
19
19
  [
20
- *remark_items
20
+ *remark_items,
21
21
  ]
22
22
  end
23
23
  end
24
24
  end
25
25
  end
26
- end
26
+ end
@@ -18,9 +18,9 @@ module Expressir
18
18
  # @return [Array<Declaration>]
19
19
  def children
20
20
  [
21
- *remark_items
21
+ *remark_items,
22
22
  ]
23
23
  end
24
24
  end
25
25
  end
26
- end
26
+ end
@@ -7,4 +7,4 @@ module Expressir
7
7
  end
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -4,10 +4,10 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 8.2.2 List data type
6
6
  class List < DataType
7
- model_attr_accessor :bound1, 'Expression'
8
- model_attr_accessor :bound2, 'Expression'
9
- model_attr_accessor :unique, '::Boolean'
10
- model_attr_accessor :base_type, 'DataType'
7
+ model_attr_accessor :bound1, "Expression"
8
+ model_attr_accessor :bound2, "Expression"
9
+ model_attr_accessor :unique, "::Boolean"
10
+ model_attr_accessor :base_type, "DataType"
11
11
 
12
12
  # @param [Hash] options
13
13
  # @option options [Expression] :bound1
@@ -25,4 +25,4 @@ module Expressir
25
25
  end
26
26
  end
27
27
  end
28
- end
28
+ end
@@ -7,4 +7,4 @@ module Expressir
7
7
  end
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -7,4 +7,4 @@ module Expressir
7
7
  end
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -4,7 +4,7 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 8.1.2 Real data type
6
6
  class Real < DataType
7
- model_attr_accessor :precision, 'Expression'
7
+ model_attr_accessor :precision, "Expression"
8
8
 
9
9
  # @param [Hash] options
10
10
  # @option options [Expression] :precision
@@ -16,4 +16,4 @@ module Expressir
16
16
  end
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -4,10 +4,10 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 8.4.2 Select data type
6
6
  class Select < DataType
7
- model_attr_accessor :extensible, '::Boolean'
8
- model_attr_accessor :generic_entity, '::Boolean'
9
- model_attr_accessor :based_on, 'Reference'
10
- model_attr_accessor :items, '::Array<Reference>'
7
+ model_attr_accessor :extensible, "::Boolean"
8
+ model_attr_accessor :generic_entity, "::Boolean"
9
+ model_attr_accessor :based_on, "Reference"
10
+ model_attr_accessor :items, "::Array<Reference>"
11
11
 
12
12
  # @param [Hash] options
13
13
  # @option options [::Boolean] :extensible
@@ -25,4 +25,4 @@ module Expressir
25
25
  end
26
26
  end
27
27
  end
28
- end
28
+ end
@@ -4,9 +4,9 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 8.2.4 Set data type
6
6
  class Set < DataType
7
- model_attr_accessor :bound1, 'Expression'
8
- model_attr_accessor :bound2, 'Expression'
9
- model_attr_accessor :base_type, 'DataType'
7
+ model_attr_accessor :bound1, "Expression"
8
+ model_attr_accessor :bound2, "Expression"
9
+ model_attr_accessor :base_type, "DataType"
10
10
 
11
11
  # @param [Hash] options
12
12
  # @option options [Expression] :bound1
@@ -22,4 +22,4 @@ module Expressir
22
22
  end
23
23
  end
24
24
  end
25
- end
25
+ end
@@ -4,8 +4,8 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 8.1.6 String data type
6
6
  class String < DataType
7
- model_attr_accessor :width, 'Expression'
8
- model_attr_accessor :fixed, '::Boolean'
7
+ model_attr_accessor :width, "Expression"
8
+ model_attr_accessor :fixed, "::Boolean"
9
9
 
10
10
  # @param [Hash] options
11
11
  # @option options [Expression] :width
@@ -19,4 +19,4 @@ module Expressir
19
19
  end
20
20
  end
21
21
  end
22
- end
22
+ end
@@ -6,4 +6,4 @@ module Expressir
6
6
  class Declaration < ModelElement
7
7
  end
8
8
  end
9
- end
9
+ end
@@ -10,11 +10,11 @@ module Expressir
10
10
  DERIVED = :DERIVED
11
11
  INVERSE = :INVERSE
12
12
 
13
- model_attr_accessor :kind, ':EXPLICIT, :DERIVED, :INVERSE'
14
- model_attr_accessor :supertype_attribute, 'Reference'
15
- model_attr_accessor :optional, 'Boolean'
16
- model_attr_accessor :type, 'DataType'
17
- model_attr_accessor :expression, 'Expression'
13
+ model_attr_accessor :kind, ":EXPLICIT, :DERIVED, :INVERSE"
14
+ model_attr_accessor :supertype_attribute, "Reference"
15
+ model_attr_accessor :optional, "Boolean"
16
+ model_attr_accessor :type, "DataType"
17
+ model_attr_accessor :expression, "Expression"
18
18
 
19
19
  # @param [Hash] options
20
20
  # @option (see Identifier#initialize_identifier)
@@ -38,10 +38,10 @@ module Expressir
38
38
  # @return [Array<Declaration>]
39
39
  def children
40
40
  [
41
- *remark_items
41
+ *remark_items,
42
42
  ]
43
43
  end
44
44
  end
45
45
  end
46
46
  end
47
- end
47
+ end
@@ -6,8 +6,8 @@ module Expressir
6
6
  class Constant < Declaration
7
7
  include Identifier
8
8
 
9
- model_attr_accessor :type, 'DataType'
10
- model_attr_accessor :expression, '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,13 +6,13 @@ module Expressir
6
6
  class Entity < Declaration
7
7
  include Identifier
8
8
 
9
- model_attr_accessor :abstract, 'Boolean'
10
- model_attr_accessor :supertype_expression, 'SupertypeExpression'
11
- model_attr_accessor :subtype_of, 'Array<Reference>'
12
- model_attr_accessor :attributes, 'Array<Attribute>'
13
- model_attr_accessor :unique_rules, 'Array<UniqueRule>'
14
- model_attr_accessor :where_rules, 'Array<WhereRule>'
15
- model_attr_accessor :informal_propositions, 'Array<RemarkItem>'
9
+ model_attr_accessor :abstract, "Boolean"
10
+ model_attr_accessor :supertype_expression, "SupertypeExpression"
11
+ model_attr_accessor :subtype_of, "Array<Reference>"
12
+ model_attr_accessor :attributes, "Array<Attribute>"
13
+ model_attr_accessor :unique_rules, "Array<UniqueRule>"
14
+ model_attr_accessor :where_rules, "Array<WhereRule>"
15
+ model_attr_accessor :informal_propositions, "Array<RemarkItem>"
16
16
 
17
17
  # @param [Hash] options
18
18
  # @option (see Identifier#initialize_identifier)
@@ -44,10 +44,10 @@ module Expressir
44
44
  *unique_rules,
45
45
  *where_rules,
46
46
  *informal_propositions,
47
- *remark_items
47
+ *remark_items,
48
48
  ]
49
49
  end
50
50
  end
51
51
  end
52
52
  end
53
- end
53
+ end
@@ -6,16 +6,16 @@ module Expressir
6
6
  class Function < Declaration
7
7
  include Identifier
8
8
 
9
- model_attr_accessor :parameters, 'Array<Parameter>'
10
- model_attr_accessor :return_type, 'DataType'
11
- model_attr_accessor :types, 'Array<Type>'
12
- model_attr_accessor :entities, 'Array<Entity>'
13
- model_attr_accessor :subtype_constraints, 'Array<SubtypeConstraint>'
14
- model_attr_accessor :functions, 'Array<Function>'
15
- model_attr_accessor :procedures, 'Array<Procedure>'
16
- model_attr_accessor :constants, 'Array<Constant>'
17
- model_attr_accessor :variables, 'Array<Variable>'
18
- model_attr_accessor :statements, 'Array<Statement>'
9
+ model_attr_accessor :parameters, "Array<Parameter>"
10
+ model_attr_accessor :return_type, "DataType"
11
+ model_attr_accessor :types, "Array<Type>"
12
+ model_attr_accessor :entities, "Array<Entity>"
13
+ model_attr_accessor :subtype_constraints, "Array<SubtypeConstraint>"
14
+ model_attr_accessor :functions, "Array<Function>"
15
+ model_attr_accessor :procedures, "Array<Procedure>"
16
+ model_attr_accessor :constants, "Array<Constant>"
17
+ model_attr_accessor :variables, "Array<Variable>"
18
+ model_attr_accessor :statements, "Array<Statement>"
19
19
 
20
20
  # @param [Hash] options
21
21
  # @option (see Identifier#initialize_identifier)
@@ -51,17 +51,17 @@ module Expressir
51
51
  [
52
52
  *parameters,
53
53
  *types,
54
- *types.flat_map{|x| x.enumeration_items},
54
+ *types.flat_map(&:enumeration_items),
55
55
  *entities,
56
56
  *subtype_constraints,
57
57
  *functions,
58
58
  *procedures,
59
59
  *constants,
60
60
  *variables,
61
- *remark_items
61
+ *remark_items,
62
62
  ]
63
63
  end
64
64
  end
65
65
  end
66
66
  end
67
- end
67
+ end
@@ -7,9 +7,9 @@ module Expressir
7
7
  USE = :USE
8
8
  REFERENCE = :REFERENCE
9
9
 
10
- model_attr_accessor :kind, ':USE, :REFERENCE'
11
- model_attr_accessor :schema, 'Reference'
12
- model_attr_accessor :items, 'Array<InterfaceItem>'
10
+ model_attr_accessor :kind, ":USE, :REFERENCE"
11
+ model_attr_accessor :schema, "Reference"
12
+ model_attr_accessor :items, "Array<InterfaceItem>"
13
13
 
14
14
  # @param [Hash] options
15
15
  # @option options [:USE, :REFERENCE] :kind
@@ -25,4 +25,4 @@ module Expressir
25
25
  end
26
26
  end
27
27
  end
28
- end
28
+ end
@@ -4,8 +4,8 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 11 Interface specification
6
6
  class InterfaceItem < ModelElement
7
- model_attr_accessor :ref, 'Reference'
8
- model_attr_accessor :id, 'String'
7
+ model_attr_accessor :ref, "Reference"
8
+ model_attr_accessor :id, "String"
9
9
 
10
10
  # @param [Hash] options
11
11
  # @option (see Identifier#initialize_identifier)
@@ -20,4 +20,4 @@ module Expressir
20
20
  end
21
21
  end
22
22
  end
23
- end
23
+ end
@@ -4,11 +4,11 @@ module Expressir
4
4
  # Specified in ISO 10303-11:2004
5
5
  # - section 11 Interface specification
6
6
  class InterfacedItem < ModelElement
7
- model_attr_accessor :id, 'String'
8
- model_attr_accessor :remarks, 'Array<String>'
9
- model_attr_accessor :remark_items, 'Array<RemarkItem>'
7
+ model_attr_accessor :id, "String"
8
+ model_attr_accessor :remarks, "Array<String>"
9
+ model_attr_accessor :remark_items, "Array<RemarkItem>"
10
10
 
11
- model_attr_accessor :base_item, 'ModelElement'
11
+ model_attr_accessor :base_item, "ModelElement"
12
12
 
13
13
  # @param [Hash] options
14
14
  # @option options [String] :id
@@ -28,10 +28,10 @@ module Expressir
28
28
  # @return [Array<Declaration>]
29
29
  def children
30
30
  [
31
- *remark_items
31
+ *remark_items,
32
32
  ]
33
33
  end
34
34
  end
35
35
  end
36
36
  end
37
- end
37
+ end
@@ -6,8 +6,8 @@ module Expressir
6
6
  class Parameter < Declaration
7
7
  include Identifier
8
8
 
9
- model_attr_accessor :var, 'Boolean'
10
- model_attr_accessor :type, 'DataType'
9
+ model_attr_accessor :var, "Boolean"
10
+ model_attr_accessor :type, "DataType"
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,15 +6,15 @@ module Expressir
6
6
  class Procedure < Declaration
7
7
  include Identifier
8
8
 
9
- model_attr_accessor :parameters, 'Array<Parameter>'
10
- model_attr_accessor :types, 'Array<Type>'
11
- model_attr_accessor :entities, 'Array<Entity>'
12
- model_attr_accessor :subtype_constraints, 'Array<SubtypeConstraint>'
13
- model_attr_accessor :functions, 'Array<Function>'
14
- model_attr_accessor :procedures, 'Array<Procedure>'
15
- model_attr_accessor :constants, 'Array<Constant>'
16
- model_attr_accessor :variables, 'Array<Variable>'
17
- model_attr_accessor :statements, 'Array<Statement>'
9
+ model_attr_accessor :parameters, "Array<Parameter>"
10
+ model_attr_accessor :types, "Array<Type>"
11
+ model_attr_accessor :entities, "Array<Entity>"
12
+ model_attr_accessor :subtype_constraints, "Array<SubtypeConstraint>"
13
+ model_attr_accessor :functions, "Array<Function>"
14
+ model_attr_accessor :procedures, "Array<Procedure>"
15
+ model_attr_accessor :constants, "Array<Constant>"
16
+ model_attr_accessor :variables, "Array<Variable>"
17
+ model_attr_accessor :statements, "Array<Statement>"
18
18
 
19
19
  # @param [Hash] options
20
20
  # @option (see Identifier#initialize_identifier)
@@ -48,17 +48,17 @@ module Expressir
48
48
  [
49
49
  *parameters,
50
50
  *types,
51
- *types.flat_map{|x| x.enumeration_items},
51
+ *types.flat_map(&:enumeration_items),
52
52
  *entities,
53
53
  *subtype_constraints,
54
54
  *functions,
55
55
  *procedures,
56
56
  *constants,
57
57
  *variables,
58
- *remark_items
58
+ *remark_items,
59
59
  ]
60
60
  end
61
61
  end
62
62
  end
63
63
  end
64
- end
64
+ end
@@ -3,8 +3,8 @@ module Expressir
3
3
  module Declarations
4
4
  # Implicit item with remarks
5
5
  class RemarkItem < Declaration
6
- model_attr_accessor :id, 'String'
7
- model_attr_accessor :remarks, 'Array<String>'
6
+ model_attr_accessor :id, "String"
7
+ model_attr_accessor :remarks, "Array<String>"
8
8
 
9
9
  # @param [Hash] options
10
10
  # @option options [String] :id
@@ -18,4 +18,4 @@ module Expressir
18
18
  end
19
19
  end
20
20
  end
21
- end
21
+ end
@@ -6,17 +6,17 @@ module Expressir
6
6
  class Rule < Declaration
7
7
  include Identifier
8
8
 
9
- model_attr_accessor :applies_to, 'Array<Reference>'
10
- model_attr_accessor :types, 'Array<Type>'
11
- model_attr_accessor :entities, 'Array<Entity>'
12
- model_attr_accessor :subtype_constraints, 'Array<SubtypeConstraint>'
13
- model_attr_accessor :functions, 'Array<Function>'
14
- model_attr_accessor :procedures, 'Array<Procedure>'
15
- model_attr_accessor :constants, 'Array<Constant>'
16
- model_attr_accessor :variables, 'Array<Variable>'
17
- model_attr_accessor :statements, 'Array<Statement>'
18
- model_attr_accessor :where_rules, 'Array<WhereRule>'
19
- model_attr_accessor :informal_propositions, 'Array<RemarkItem>'
9
+ model_attr_accessor :applies_to, "Array<Reference>"
10
+ model_attr_accessor :types, "Array<Type>"
11
+ model_attr_accessor :entities, "Array<Entity>"
12
+ model_attr_accessor :subtype_constraints, "Array<SubtypeConstraint>"
13
+ model_attr_accessor :functions, "Array<Function>"
14
+ model_attr_accessor :procedures, "Array<Procedure>"
15
+ model_attr_accessor :constants, "Array<Constant>"
16
+ model_attr_accessor :variables, "Array<Variable>"
17
+ model_attr_accessor :statements, "Array<Statement>"
18
+ model_attr_accessor :where_rules, "Array<WhereRule>"
19
+ model_attr_accessor :informal_propositions, "Array<RemarkItem>"
20
20
 
21
21
  # @param [Hash] options
22
22
  # @option (see Identifier#initialize_identifier)
@@ -53,7 +53,7 @@ module Expressir
53
53
  def children
54
54
  [
55
55
  *types,
56
- *types.flat_map{|x| x.enumeration_items},
56
+ *types.flat_map(&:enumeration_items),
57
57
  *entities,
58
58
  *subtype_constraints,
59
59
  *functions,
@@ -62,10 +62,10 @@ module Expressir
62
62
  *variables,
63
63
  *where_rules,
64
64
  *informal_propositions,
65
- *remark_items
65
+ *remark_items,
66
66
  ]
67
67
  end
68
68
  end
69
69
  end
70
70
  end
71
- end
71
+ end