expressir 2.0.0 → 2.1.0
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_todo.yml +15 -1
- data/Gemfile +0 -1
- data/exe/{format-test → expressir-format-test} +1 -1
- data/expressir.gemspec +2 -2
- data/lib/expressir/liquid/cache_drop.rb +20 -0
- data/lib/expressir/liquid/data_type_drop.rb +8 -0
- data/lib/expressir/liquid/data_types/aggregate_drop.rb +21 -0
- data/lib/expressir/liquid/data_types/array_drop.rb +34 -0
- data/lib/expressir/liquid/data_types/bag_drop.rb +26 -0
- data/lib/expressir/liquid/data_types/binary_drop.rb +22 -0
- data/lib/expressir/liquid/data_types/boolean_drop.rb +10 -0
- data/lib/expressir/liquid/data_types/enumeration_drop.rb +30 -0
- data/lib/expressir/liquid/data_types/enumeration_item_drop.rb +17 -0
- data/lib/expressir/liquid/data_types/generic_drop.rb +17 -0
- data/lib/expressir/liquid/data_types/generic_entity_drop.rb +17 -0
- data/lib/expressir/liquid/data_types/integer_drop.rb +10 -0
- data/lib/expressir/liquid/data_types/list_drop.rb +30 -0
- data/lib/expressir/liquid/data_types/logical_drop.rb +10 -0
- data/lib/expressir/liquid/data_types/number_drop.rb +10 -0
- data/lib/expressir/liquid/data_types/real_drop.rb +18 -0
- data/lib/expressir/liquid/data_types/select_drop.rb +34 -0
- data/lib/expressir/liquid/data_types/set_drop.rb +26 -0
- data/lib/expressir/liquid/data_types/string_drop.rb +22 -0
- data/lib/expressir/liquid/declaration_drop.rb +8 -0
- data/lib/expressir/liquid/declarations/attribute_drop.rb +37 -0
- data/lib/expressir/liquid/declarations/constant_drop.rb +25 -0
- data/lib/expressir/liquid/declarations/entity_drop.rb +65 -0
- data/lib/expressir/liquid/declarations/function_drop.rb +93 -0
- data/lib/expressir/liquid/declarations/interface_drop.rb +30 -0
- data/lib/expressir/liquid/declarations/interface_item_drop.rb +22 -0
- data/lib/expressir/liquid/declarations/interfaced_item_drop.rb +34 -0
- data/lib/expressir/liquid/declarations/parameter_drop.rb +25 -0
- data/lib/expressir/liquid/declarations/procedure_drop.rb +89 -0
- data/lib/expressir/liquid/declarations/remark_item_drop.rb +22 -0
- data/lib/expressir/liquid/declarations/rule_drop.rb +105 -0
- data/lib/expressir/liquid/declarations/schema_drop.rb +91 -0
- data/lib/expressir/liquid/declarations/schema_version_drop.rb +26 -0
- data/lib/expressir/liquid/declarations/schema_version_item_drop.rb +22 -0
- data/lib/expressir/liquid/declarations/subtype_constraint_drop.rb +37 -0
- data/lib/expressir/liquid/declarations/type_drop.rb +37 -0
- data/lib/expressir/liquid/declarations/unique_rule_drop.rb +21 -0
- data/lib/expressir/liquid/declarations/variable_drop.rb +25 -0
- data/lib/expressir/liquid/declarations/where_rule_drop.rb +21 -0
- data/lib/expressir/liquid/expression_drop.rb +8 -0
- data/lib/expressir/liquid/expressions/aggregate_initializer_drop.rb +24 -0
- data/lib/expressir/liquid/expressions/aggregate_initializer_item_drop.rb +22 -0
- data/lib/expressir/liquid/expressions/binary_expression_drop.rb +26 -0
- data/lib/expressir/liquid/expressions/entity_constructor_drop.rb +26 -0
- data/lib/expressir/liquid/expressions/function_call_drop.rb +26 -0
- data/lib/expressir/liquid/expressions/interval_drop.rb +34 -0
- data/lib/expressir/liquid/expressions/query_expression_drop.rb +25 -0
- data/lib/expressir/liquid/expressions/unary_expression_drop.rb +22 -0
- data/lib/expressir/liquid/identifier_drop.rb +33 -0
- data/lib/expressir/liquid/literal_drop.rb +8 -0
- data/lib/expressir/liquid/literals/binary_drop.rb +18 -0
- data/lib/expressir/liquid/literals/integer_drop.rb +18 -0
- data/lib/expressir/liquid/literals/logical_drop.rb +18 -0
- data/lib/expressir/liquid/literals/real_drop.rb +18 -0
- data/lib/expressir/liquid/literals/string_drop.rb +22 -0
- data/lib/expressir/liquid/model_element_drop.rb +33 -0
- data/lib/expressir/liquid/reference_drop.rb +8 -0
- data/lib/expressir/liquid/references/attribute_reference_drop.rb +22 -0
- data/lib/expressir/liquid/references/group_reference_drop.rb +22 -0
- data/lib/expressir/liquid/references/index_reference_drop.rb +26 -0
- data/lib/expressir/liquid/references/simple_reference_drop.rb +22 -0
- data/lib/expressir/liquid/repository_drop.rb +22 -0
- data/lib/expressir/liquid/statement_drop.rb +8 -0
- data/lib/expressir/liquid/statements/alias_drop.rb +29 -0
- data/lib/expressir/liquid/statements/assignment_drop.rb +22 -0
- data/lib/expressir/liquid/statements/case_action_drop.rb +26 -0
- data/lib/expressir/liquid/statements/case_drop.rb +30 -0
- data/lib/expressir/liquid/statements/compound_drop.rb +22 -0
- data/lib/expressir/liquid/statements/escape_drop.rb +10 -0
- data/lib/expressir/liquid/statements/if_drop.rb +34 -0
- data/lib/expressir/liquid/statements/null_drop.rb +10 -0
- data/lib/expressir/liquid/statements/procedure_call_drop.rb +26 -0
- data/lib/expressir/liquid/statements/repeat_drop.rb +45 -0
- data/lib/expressir/liquid/statements/return_drop.rb +18 -0
- data/lib/expressir/liquid/statements/skip_drop.rb +10 -0
- data/lib/expressir/liquid/supertype_expression_drop.rb +8 -0
- data/lib/expressir/liquid/supertype_expressions/binary_supertype_expression_drop.rb +26 -0
- data/lib/expressir/liquid/supertype_expressions/oneof_supertype_expression_drop.rb +22 -0
- data/lib/expressir/liquid.rb +18 -0
- data/lib/expressir/model/model_element.rb +7 -0
- data/lib/expressir/version.rb +1 -1
- data/lib/expressir.rb +2 -0
- metadata +98 -8
- /data/exe/{format → expressir-format} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cbd41bdd1b751ae458be19326cd83cb663516e4377de07b935e914610812bccd
|
|
4
|
+
data.tar.gz: 89a7c1ca633ecd262d9990aa1915a63480e2cbd61ffcd25f8c29e8906a74ebcf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ded756dbd4abdc170eac6eaef07af7af582d608fc3f974ed6b2d8b36a83cd2ebc1f3a5196228b5bb5a027e0361b12c4ad233e15d1a137183def193a07cbcd7f7
|
|
7
|
+
data.tar.gz: c325aeec18fa692234d24883b68cf650ca4a5f85c614b311671cc62659b1d52f6a1526bd938350259cc6eaf45fdfd8e3e181133258a31d2d32091c2a03eead2e
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2024-11-
|
|
3
|
+
# on 2024-11-19 15:15:51 UTC using RuboCop version 1.68.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
|
12
|
+
# URISchemes: http, https
|
|
13
|
+
Layout/LineLength:
|
|
14
|
+
Exclude:
|
|
15
|
+
- 'exe/expressir-format-test'
|
|
16
|
+
|
|
17
|
+
# Offense count: 1
|
|
18
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
19
|
+
# AllowedMethods: refine
|
|
20
|
+
Metrics/BlockLength:
|
|
21
|
+
Max: 36
|
data/Gemfile
CHANGED
|
@@ -75,7 +75,7 @@ formatter = Class.new(Expressir::Express::Formatter) do
|
|
|
75
75
|
include Expressir::Express::SchemaHeadFormatter
|
|
76
76
|
include Expressir::Express::HyperlinkFormatter
|
|
77
77
|
end
|
|
78
|
-
|
|
78
|
+
repository.to_hash(formatter: formatter)
|
|
79
79
|
puts "Repository.to_hash time: #{(Time.now - start).round(2)}s"
|
|
80
80
|
|
|
81
81
|
# puts YAML.dump(result)
|
data/expressir.gemspec
CHANGED
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
22
22
|
spec.metadata["source_code_uri"] = spec.homepage
|
|
23
23
|
spec.metadata["changelog_uri"] = "https://github.com/lutaml/expressir/releases"
|
|
24
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
|
24
25
|
|
|
25
26
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
|
26
27
|
|
|
@@ -30,10 +31,9 @@ Gem::Specification.new do |spec|
|
|
|
30
31
|
end
|
|
31
32
|
end
|
|
32
33
|
|
|
33
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
34
34
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
|
35
35
|
|
|
36
36
|
spec.add_dependency "thor", "~> 1.0"
|
|
37
37
|
spec.add_dependency "parslet", "~> 2.0"
|
|
38
|
-
spec.
|
|
38
|
+
spec.add_dependency "liquid"
|
|
39
39
|
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
class CacheDrop < ::Expressir::Liquid::ModelElementDrop
|
|
6
|
+
def initialize(model)
|
|
7
|
+
@model = model
|
|
8
|
+
super
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def version
|
|
12
|
+
@model.version
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def content
|
|
16
|
+
::Expressir::Liquid::ModelElementDrop.new(@model.content)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class AggregateDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
include ::Expressir::Liquid::IdentifierDrop
|
|
8
|
+
|
|
9
|
+
def initialize(model)
|
|
10
|
+
@model = model
|
|
11
|
+
initialize_identifier(@model)
|
|
12
|
+
super
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def base_type
|
|
16
|
+
drop_klass_by_model(@model.base_type)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class ArrayDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
def initialize(model)
|
|
8
|
+
@model = model
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def bound1
|
|
13
|
+
drop_klass_by_model(@model.bound1)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def bound2
|
|
17
|
+
drop_klass_by_model(@model.bound2)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def optional
|
|
21
|
+
@model.optional
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def unique
|
|
25
|
+
@model.unique
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def base_type
|
|
29
|
+
drop_klass_by_model(@model.base_type)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class BagDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
def initialize(model)
|
|
8
|
+
@model = model
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def bound1
|
|
13
|
+
drop_klass_by_model(@model.bound1)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def bound2
|
|
17
|
+
drop_klass_by_model(@model.bound2)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def base_type
|
|
21
|
+
drop_klass_by_model(@model.base_type)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class BinaryDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
def initialize(model)
|
|
8
|
+
@model = model
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def width
|
|
13
|
+
drop_klass_by_model(@model.width)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def fixed
|
|
17
|
+
@model.fixed
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class EnumerationDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
def initialize(model)
|
|
8
|
+
@model = model
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def extensible
|
|
13
|
+
@model.extensible
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def based_on
|
|
17
|
+
drop_klass_by_model(@model.based_on)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def items
|
|
21
|
+
return [] unless @model.items
|
|
22
|
+
|
|
23
|
+
@model.items.map do |item|
|
|
24
|
+
::Expressir::Liquid::DataTypes::EnumerationItemDrop.new(item)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class EnumerationItemDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
include ::Expressir::Liquid::IdentifierDrop
|
|
8
|
+
|
|
9
|
+
def initialize(model)
|
|
10
|
+
@model = model
|
|
11
|
+
initialize_identifier(@model)
|
|
12
|
+
super
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class GenericDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
include ::Expressir::Liquid::IdentifierDrop
|
|
8
|
+
|
|
9
|
+
def initialize(model)
|
|
10
|
+
@model = model
|
|
11
|
+
initialize_identifier(@model)
|
|
12
|
+
super
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class GenericEntityDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
include ::Expressir::Liquid::IdentifierDrop
|
|
8
|
+
|
|
9
|
+
def initialize(model)
|
|
10
|
+
@model = model
|
|
11
|
+
initialize_identifier(@model)
|
|
12
|
+
super
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class ListDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
def initialize(model)
|
|
8
|
+
@model = model
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def bound1
|
|
13
|
+
drop_klass_by_model(@model.bound1)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def bound2
|
|
17
|
+
drop_klass_by_model(@model.bound2)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def unique
|
|
21
|
+
@model.unique
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def base_type
|
|
25
|
+
drop_klass_by_model(@model.base_type)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class RealDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
def initialize(model)
|
|
8
|
+
@model = model
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def precision
|
|
13
|
+
drop_klass_by_model(@model.precision)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class SelectDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
def initialize(model)
|
|
8
|
+
@model = model
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def extensible
|
|
13
|
+
@model.extensible
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def generic_entity
|
|
17
|
+
@model.generic_entity
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def based_on
|
|
21
|
+
drop_klass_by_model(@model.based_on)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def items
|
|
25
|
+
return [] unless @model.items
|
|
26
|
+
|
|
27
|
+
@model.items.map do |item|
|
|
28
|
+
drop_klass_by_model(item)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class SetDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
def initialize(model)
|
|
8
|
+
@model = model
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def bound1
|
|
13
|
+
drop_klass_by_model(@model.bound1)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def bound2
|
|
17
|
+
drop_klass_by_model(@model.bound2)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def base_type
|
|
21
|
+
drop_klass_by_model(@model.base_type)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module DataTypes
|
|
6
|
+
class StringDrop < ::Expressir::Liquid::DataTypeDrop
|
|
7
|
+
def initialize(model)
|
|
8
|
+
@model = model
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def width
|
|
13
|
+
drop_klass_by_model(@model.width)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def fixed
|
|
17
|
+
@model.fixed
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module Declarations
|
|
6
|
+
class AttributeDrop < ::Expressir::Liquid::DeclarationDrop
|
|
7
|
+
include ::Expressir::Liquid::IdentifierDrop
|
|
8
|
+
|
|
9
|
+
def initialize(model)
|
|
10
|
+
@model = model
|
|
11
|
+
initialize_identifier(@model)
|
|
12
|
+
super
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def kind
|
|
16
|
+
@model.kind
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def supertype_attribute
|
|
20
|
+
drop_klass_by_model(@model.supertype_attribute)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def optional
|
|
24
|
+
@model.optional
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def type
|
|
28
|
+
drop_klass_by_model(@model.type)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def expression
|
|
32
|
+
drop_klass_by_model(@model.expression)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module Declarations
|
|
6
|
+
class ConstantDrop < ::Expressir::Liquid::DeclarationDrop
|
|
7
|
+
include ::Expressir::Liquid::IdentifierDrop
|
|
8
|
+
|
|
9
|
+
def initialize(model)
|
|
10
|
+
@model = model
|
|
11
|
+
initialize_identifier(@model)
|
|
12
|
+
super
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def type
|
|
16
|
+
drop_klass_by_model(@model.type)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def expression
|
|
20
|
+
drop_klass_by_model(@model.expression)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Liquid
|
|
5
|
+
module Declarations
|
|
6
|
+
class EntityDrop < ::Expressir::Liquid::DeclarationDrop
|
|
7
|
+
include ::Expressir::Liquid::IdentifierDrop
|
|
8
|
+
|
|
9
|
+
def initialize(model)
|
|
10
|
+
@model = model
|
|
11
|
+
initialize_identifier(@model)
|
|
12
|
+
super
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def abstract
|
|
16
|
+
@model.abstract
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def supertype_expression
|
|
20
|
+
drop_klass_by_model(@model.supertype_expression)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def subtype_of
|
|
24
|
+
return [] unless @model.subtype_of
|
|
25
|
+
|
|
26
|
+
@model.subtype_of.map do |item|
|
|
27
|
+
drop_klass_by_model(item)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def attributes
|
|
32
|
+
return [] unless @model.attributes
|
|
33
|
+
|
|
34
|
+
@model.attributes.map do |item|
|
|
35
|
+
::Expressir::Liquid::Declarations::AttributeDrop.new(item)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def unique_rules
|
|
40
|
+
return [] unless @model.unique_rules
|
|
41
|
+
|
|
42
|
+
@model.unique_rules.map do |item|
|
|
43
|
+
::Expressir::Liquid::Declarations::UniqueRuleDrop.new(item)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def where_rules
|
|
48
|
+
return [] unless @model.where_rules
|
|
49
|
+
|
|
50
|
+
@model.where_rules.map do |item|
|
|
51
|
+
::Expressir::Liquid::Declarations::WhereRuleDrop.new(item)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def informal_propositions
|
|
56
|
+
return [] unless @model.informal_propositions
|
|
57
|
+
|
|
58
|
+
@model.informal_propositions.map do |item|
|
|
59
|
+
::Expressir::Liquid::Declarations::RemarkItemDrop.new(item)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|