deimos-ruby 2.1.3 → 2.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1875e1db2f1a907bc82f3dacb4c1a9fea9be64afb90f317a3f41bbcec5296993
4
- data.tar.gz: 03ab989cc0eb681cd60f39a30843298588bc67519e2851a2c3665bad2d62e441
3
+ metadata.gz: 3b6f32c7658a4b3cc134cc544bb0d4291b90e6424df288f4b4fcfd7fa93c630f
4
+ data.tar.gz: 2f3ebc77c9c622f5256d77448fec7c7303134519acaa1611f985002838f0278e
5
5
  SHA512:
6
- metadata.gz: 709f60ba95583f9e2f9c19055d90a3bd64a6a6184913e46c0152ca95b6592ed287a39f4feceb658ebecbdd9ccc2dcac42aec4a1d009ecbccd215b3687f432356
7
- data.tar.gz: a4e884f2b11c789c6c162f3ed3c985842603ab2a529e4091a693d0cc444a45b3aa83d572c259e0b0a89b4ac4d319780132e58d78b2de9ea2d0757b587beb1923
6
+ metadata.gz: 4654cbbe510338b52186bf6eb507c930cb932293c0018f4ca5cda83acb1b901ecc646af7adbed3ca167ea1d756b1c3a19857cc727ac7de902028718fad13b9cd
7
+ data.tar.gz: b4cc6c4f30a5c6e5d94b2c56f194ee3fc1b04467f577928f89e6550fca1d0aee2b078c6b616a68db820c132d67a985fbe444302143eed7c218cae50f91d920fd
data/CHANGELOG.md CHANGED
@@ -7,8 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## UNRELEASED
9
9
 
10
- # 2.1.3 - 2025-07-22
10
+ # 2.1.4 - 2025-07-22
11
11
 
12
+ - Feature: Add interrogation methods (e.g. `approved?`) for schema class enums.
12
13
  - Fix: Schema class generation was missing payload_key for a number of cases.
13
14
  - Fix: Possible crashes when using schema classes with Avro messages.
14
15
 
@@ -90,9 +90,9 @@ module Deimos
90
90
 
91
91
  return value if value.is_a?(self)
92
92
  if from_message
93
- self.new_from_message(**value.symbolize_keys)
93
+ self.new_from_message(**value&.symbolize_keys || {})
94
94
  else
95
- self.new(**value.symbolize_keys)
95
+ self.new(**value&.symbolize_keys || {})
96
96
  end
97
97
  end
98
98
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '2.1.3'
4
+ VERSION = '2.1.4'
5
5
  end
@@ -1,10 +1,13 @@
1
1
  # Autogenerated Schema for Enum at <%= @current_schema.namespace %>.<%= @current_schema.name %>
2
2
  class <%= Deimos::SchemaBackends::AvroBase.schema_classname(@current_schema) %> < Deimos::SchemaClass::Enum
3
- # @return ['<%= @current_schema.symbols.join("', '") %>']
4
- attr_accessor :<%= @current_schema.name.underscore %>
5
-
6
3
  # @override
7
4
  def symbols
8
5
  %w(<%= @current_schema.symbols.join(' ') %>)
9
6
  end
7
+
8
+ <% @current_schema.symbols.each do |symbol| %>
9
+ def <%= symbol.underscore %>?
10
+ @value == '<%= symbol %>'
11
+ end
12
+ <% end %>
10
13
  end
@@ -46,13 +46,20 @@ module Schemas
46
46
  ### Primary Schema Class ###
47
47
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
48
48
  class AnEnum < Deimos::SchemaClass::Enum
49
- # @return ['sym1', 'sym2']
50
- attr_accessor :an_enum
51
-
52
49
  # @override
53
50
  def symbols
54
51
  %w(sym1 sym2)
55
52
  end
53
+
54
+
55
+ def sym1?
56
+ @value == 'sym1'
57
+ end
58
+
59
+ def sym2?
60
+ @value == 'sym2'
61
+ end
62
+
56
63
  end
57
64
  end
58
65
 
@@ -65,13 +72,20 @@ module Schemas
65
72
  ### Primary Schema Class ###
66
73
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
67
74
  class AnotherEnum < Deimos::SchemaClass::Enum
68
- # @return ['sym3', 'sym4']
69
- attr_accessor :another_enum
70
-
71
75
  # @override
72
76
  def symbols
73
77
  %w(sym3 sym4)
74
78
  end
79
+
80
+
81
+ def sym3?
82
+ @value == 'sym3'
83
+ end
84
+
85
+ def sym4?
86
+ @value == 'sym4'
87
+ end
88
+
75
89
  end
76
90
  end
77
91
 
@@ -1642,13 +1656,20 @@ module Schemas
1642
1656
  ### Primary Schema Class ###
1643
1657
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
1644
1658
  class YetAnotherEnum < Deimos::SchemaClass::Enum
1645
- # @return ['sym5', 'sym6']
1646
- attr_accessor :yet_another_enum
1647
-
1648
1659
  # @override
1649
1660
  def symbols
1650
1661
  %w(sym5 sym6)
1651
1662
  end
1663
+
1664
+
1665
+ def sym5?
1666
+ @value == 'sym5'
1667
+ end
1668
+
1669
+ def sym6?
1670
+ @value == 'sym6'
1671
+ end
1672
+
1652
1673
  end
1653
1674
  end
1654
1675
 
@@ -82,13 +82,20 @@ module Schemas
82
82
 
83
83
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
84
84
  class AnEnum < Deimos::SchemaClass::Enum
85
- # @return ['sym1', 'sym2']
86
- attr_accessor :an_enum
87
-
88
85
  # @override
89
86
  def symbols
90
87
  %w(sym1 sym2)
91
88
  end
89
+
90
+
91
+ def sym1?
92
+ @value == 'sym1'
93
+ end
94
+
95
+ def sym2?
96
+ @value == 'sym2'
97
+ end
98
+
92
99
  end
93
100
 
94
101
 
@@ -746,35 +753,56 @@ module Schemas
746
753
 
747
754
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
748
755
  class AnEnum < Deimos::SchemaClass::Enum
749
- # @return ['sym1', 'sym2']
750
- attr_accessor :an_enum
751
-
752
756
  # @override
753
757
  def symbols
754
758
  %w(sym1 sym2)
755
759
  end
760
+
761
+
762
+ def sym1?
763
+ @value == 'sym1'
764
+ end
765
+
766
+ def sym2?
767
+ @value == 'sym2'
768
+ end
769
+
756
770
  end
757
771
 
758
772
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
759
773
  class AnotherEnum < Deimos::SchemaClass::Enum
760
- # @return ['sym3', 'sym4']
761
- attr_accessor :another_enum
762
-
763
774
  # @override
764
775
  def symbols
765
776
  %w(sym3 sym4)
766
777
  end
778
+
779
+
780
+ def sym3?
781
+ @value == 'sym3'
782
+ end
783
+
784
+ def sym4?
785
+ @value == 'sym4'
786
+ end
787
+
767
788
  end
768
789
 
769
790
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
770
791
  class YetAnotherEnum < Deimos::SchemaClass::Enum
771
- # @return ['sym5', 'sym6']
772
- attr_accessor :yet_another_enum
773
-
774
792
  # @override
775
793
  def symbols
776
794
  %w(sym5 sym6)
777
795
  end
796
+
797
+
798
+ def sym5?
799
+ @value == 'sym5'
800
+ end
801
+
802
+ def sym6?
803
+ @value == 'sym6'
804
+ end
805
+
778
806
  end
779
807
 
780
808
 
@@ -46,13 +46,20 @@ module Schemas
46
46
  ### Primary Schema Class ###
47
47
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
48
48
  class AnEnum < Deimos::SchemaClass::Enum
49
- # @return ['sym1', 'sym2']
50
- attr_accessor :an_enum
51
-
52
49
  # @override
53
50
  def symbols
54
51
  %w(sym1 sym2)
55
52
  end
53
+
54
+
55
+ def sym1?
56
+ @value == 'sym1'
57
+ end
58
+
59
+ def sym2?
60
+ @value == 'sym2'
61
+ end
62
+
56
63
  end
57
64
  end
58
65
 
@@ -65,13 +72,20 @@ module Schemas
65
72
  ### Primary Schema Class ###
66
73
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
67
74
  class AnotherEnum < Deimos::SchemaClass::Enum
68
- # @return ['sym3', 'sym4']
69
- attr_accessor :another_enum
70
-
71
75
  # @override
72
76
  def symbols
73
77
  %w(sym3 sym4)
74
78
  end
79
+
80
+
81
+ def sym3?
82
+ @value == 'sym3'
83
+ end
84
+
85
+ def sym4?
86
+ @value == 'sym4'
87
+ end
88
+
75
89
  end
76
90
  end
77
91
 
@@ -1642,13 +1656,20 @@ module Schemas
1642
1656
  ### Primary Schema Class ###
1643
1657
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
1644
1658
  class YetAnotherEnum < Deimos::SchemaClass::Enum
1645
- # @return ['sym5', 'sym6']
1646
- attr_accessor :yet_another_enum
1647
-
1648
1659
  # @override
1649
1660
  def symbols
1650
1661
  %w(sym5 sym6)
1651
1662
  end
1663
+
1664
+
1665
+ def sym5?
1666
+ @value == 'sym5'
1667
+ end
1668
+
1669
+ def sym6?
1670
+ @value == 'sym6'
1671
+ end
1672
+
1652
1673
  end
1653
1674
  end
1654
1675
 
@@ -82,13 +82,20 @@ module Schemas
82
82
 
83
83
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
84
84
  class AnEnum < Deimos::SchemaClass::Enum
85
- # @return ['sym1', 'sym2']
86
- attr_accessor :an_enum
87
-
88
85
  # @override
89
86
  def symbols
90
87
  %w(sym1 sym2)
91
88
  end
89
+
90
+
91
+ def sym1?
92
+ @value == 'sym1'
93
+ end
94
+
95
+ def sym2?
96
+ @value == 'sym2'
97
+ end
98
+
92
99
  end
93
100
 
94
101
 
@@ -746,35 +753,56 @@ module Schemas
746
753
 
747
754
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
748
755
  class AnEnum < Deimos::SchemaClass::Enum
749
- # @return ['sym1', 'sym2']
750
- attr_accessor :an_enum
751
-
752
756
  # @override
753
757
  def symbols
754
758
  %w(sym1 sym2)
755
759
  end
760
+
761
+
762
+ def sym1?
763
+ @value == 'sym1'
764
+ end
765
+
766
+ def sym2?
767
+ @value == 'sym2'
768
+ end
769
+
756
770
  end
757
771
 
758
772
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
759
773
  class AnotherEnum < Deimos::SchemaClass::Enum
760
- # @return ['sym3', 'sym4']
761
- attr_accessor :another_enum
762
-
763
774
  # @override
764
775
  def symbols
765
776
  %w(sym3 sym4)
766
777
  end
778
+
779
+
780
+ def sym3?
781
+ @value == 'sym3'
782
+ end
783
+
784
+ def sym4?
785
+ @value == 'sym4'
786
+ end
787
+
767
788
  end
768
789
 
769
790
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
770
791
  class YetAnotherEnum < Deimos::SchemaClass::Enum
771
- # @return ['sym5', 'sym6']
772
- attr_accessor :yet_another_enum
773
-
774
792
  # @override
775
793
  def symbols
776
794
  %w(sym5 sym6)
777
795
  end
796
+
797
+
798
+ def sym5?
799
+ @value == 'sym5'
800
+ end
801
+
802
+ def sym6?
803
+ @value == 'sym6'
804
+ end
805
+
778
806
  end
779
807
 
780
808
 
@@ -46,13 +46,20 @@ module Schemas
46
46
  ### Primary Schema Class ###
47
47
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
48
48
  class AnEnum < Deimos::SchemaClass::Enum
49
- # @return ['sym1', 'sym2']
50
- attr_accessor :an_enum
51
-
52
49
  # @override
53
50
  def symbols
54
51
  %w(sym1 sym2)
55
52
  end
53
+
54
+
55
+ def sym1?
56
+ @value == 'sym1'
57
+ end
58
+
59
+ def sym2?
60
+ @value == 'sym2'
61
+ end
62
+
56
63
  end
57
64
  end
58
65
 
@@ -65,13 +72,20 @@ module Schemas
65
72
  ### Primary Schema Class ###
66
73
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
67
74
  class AnotherEnum < Deimos::SchemaClass::Enum
68
- # @return ['sym3', 'sym4']
69
- attr_accessor :another_enum
70
-
71
75
  # @override
72
76
  def symbols
73
77
  %w(sym3 sym4)
74
78
  end
79
+
80
+
81
+ def sym3?
82
+ @value == 'sym3'
83
+ end
84
+
85
+ def sym4?
86
+ @value == 'sym4'
87
+ end
88
+
75
89
  end
76
90
  end
77
91
 
@@ -1642,13 +1656,20 @@ module Schemas
1642
1656
  ### Primary Schema Class ###
1643
1657
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
1644
1658
  class YetAnotherEnum < Deimos::SchemaClass::Enum
1645
- # @return ['sym5', 'sym6']
1646
- attr_accessor :yet_another_enum
1647
-
1648
1659
  # @override
1649
1660
  def symbols
1650
1661
  %w(sym5 sym6)
1651
1662
  end
1663
+
1664
+
1665
+ def sym5?
1666
+ @value == 'sym5'
1667
+ end
1668
+
1669
+ def sym6?
1670
+ @value == 'sym6'
1671
+ end
1672
+
1652
1673
  end
1653
1674
  end
1654
1675
 
@@ -82,13 +82,20 @@ module Schemas
82
82
 
83
83
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
84
84
  class AnEnum < Deimos::SchemaClass::Enum
85
- # @return ['sym1', 'sym2']
86
- attr_accessor :an_enum
87
-
88
85
  # @override
89
86
  def symbols
90
87
  %w(sym1 sym2)
91
88
  end
89
+
90
+
91
+ def sym1?
92
+ @value == 'sym1'
93
+ end
94
+
95
+ def sym2?
96
+ @value == 'sym2'
97
+ end
98
+
92
99
  end
93
100
 
94
101
 
@@ -746,35 +753,56 @@ module Schemas
746
753
 
747
754
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
748
755
  class AnEnum < Deimos::SchemaClass::Enum
749
- # @return ['sym1', 'sym2']
750
- attr_accessor :an_enum
751
-
752
756
  # @override
753
757
  def symbols
754
758
  %w(sym1 sym2)
755
759
  end
760
+
761
+
762
+ def sym1?
763
+ @value == 'sym1'
764
+ end
765
+
766
+ def sym2?
767
+ @value == 'sym2'
768
+ end
769
+
756
770
  end
757
771
 
758
772
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
759
773
  class AnotherEnum < Deimos::SchemaClass::Enum
760
- # @return ['sym3', 'sym4']
761
- attr_accessor :another_enum
762
-
763
774
  # @override
764
775
  def symbols
765
776
  %w(sym3 sym4)
766
777
  end
778
+
779
+
780
+ def sym3?
781
+ @value == 'sym3'
782
+ end
783
+
784
+ def sym4?
785
+ @value == 'sym4'
786
+ end
787
+
767
788
  end
768
789
 
769
790
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
770
791
  class YetAnotherEnum < Deimos::SchemaClass::Enum
771
- # @return ['sym5', 'sym6']
772
- attr_accessor :yet_another_enum
773
-
774
792
  # @override
775
793
  def symbols
776
794
  %w(sym5 sym6)
777
795
  end
796
+
797
+
798
+ def sym5?
799
+ @value == 'sym5'
800
+ end
801
+
802
+ def sym6?
803
+ @value == 'sym6'
804
+ end
805
+
778
806
  end
779
807
 
780
808
 
@@ -46,13 +46,20 @@ module Schemas
46
46
  ### Primary Schema Class ###
47
47
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
48
48
  class AnEnum < Deimos::SchemaClass::Enum
49
- # @return ['sym1', 'sym2']
50
- attr_accessor :an_enum
51
-
52
49
  # @override
53
50
  def symbols
54
51
  %w(sym1 sym2)
55
52
  end
53
+
54
+
55
+ def sym1?
56
+ @value == 'sym1'
57
+ end
58
+
59
+ def sym2?
60
+ @value == 'sym2'
61
+ end
62
+
56
63
  end
57
64
  end
58
65
 
@@ -65,13 +72,20 @@ module Schemas
65
72
  ### Primary Schema Class ###
66
73
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
67
74
  class AnotherEnum < Deimos::SchemaClass::Enum
68
- # @return ['sym3', 'sym4']
69
- attr_accessor :another_enum
70
-
71
75
  # @override
72
76
  def symbols
73
77
  %w(sym3 sym4)
74
78
  end
79
+
80
+
81
+ def sym3?
82
+ @value == 'sym3'
83
+ end
84
+
85
+ def sym4?
86
+ @value == 'sym4'
87
+ end
88
+
75
89
  end
76
90
  end
77
91
 
@@ -1642,13 +1656,20 @@ module Schemas
1642
1656
  ### Primary Schema Class ###
1643
1657
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
1644
1658
  class YetAnotherEnum < Deimos::SchemaClass::Enum
1645
- # @return ['sym5', 'sym6']
1646
- attr_accessor :yet_another_enum
1647
-
1648
1659
  # @override
1649
1660
  def symbols
1650
1661
  %w(sym5 sym6)
1651
1662
  end
1663
+
1664
+
1665
+ def sym5?
1666
+ @value == 'sym5'
1667
+ end
1668
+
1669
+ def sym6?
1670
+ @value == 'sym6'
1671
+ end
1672
+
1652
1673
  end
1653
1674
  end
1654
1675
 
@@ -82,13 +82,20 @@ module Schemas
82
82
 
83
83
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
84
84
  class AnEnum < Deimos::SchemaClass::Enum
85
- # @return ['sym1', 'sym2']
86
- attr_accessor :an_enum
87
-
88
85
  # @override
89
86
  def symbols
90
87
  %w(sym1 sym2)
91
88
  end
89
+
90
+
91
+ def sym1?
92
+ @value == 'sym1'
93
+ end
94
+
95
+ def sym2?
96
+ @value == 'sym2'
97
+ end
98
+
92
99
  end
93
100
 
94
101
 
@@ -746,35 +753,56 @@ module Schemas
746
753
 
747
754
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
748
755
  class AnEnum < Deimos::SchemaClass::Enum
749
- # @return ['sym1', 'sym2']
750
- attr_accessor :an_enum
751
-
752
756
  # @override
753
757
  def symbols
754
758
  %w(sym1 sym2)
755
759
  end
760
+
761
+
762
+ def sym1?
763
+ @value == 'sym1'
764
+ end
765
+
766
+ def sym2?
767
+ @value == 'sym2'
768
+ end
769
+
756
770
  end
757
771
 
758
772
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
759
773
  class AnotherEnum < Deimos::SchemaClass::Enum
760
- # @return ['sym3', 'sym4']
761
- attr_accessor :another_enum
762
-
763
774
  # @override
764
775
  def symbols
765
776
  %w(sym3 sym4)
766
777
  end
778
+
779
+
780
+ def sym3?
781
+ @value == 'sym3'
782
+ end
783
+
784
+ def sym4?
785
+ @value == 'sym4'
786
+ end
787
+
767
788
  end
768
789
 
769
790
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
770
791
  class YetAnotherEnum < Deimos::SchemaClass::Enum
771
- # @return ['sym5', 'sym6']
772
- attr_accessor :yet_another_enum
773
-
774
792
  # @override
775
793
  def symbols
776
794
  %w(sym5 sym6)
777
795
  end
796
+
797
+
798
+ def sym5?
799
+ @value == 'sym5'
800
+ end
801
+
802
+ def sym6?
803
+ @value == 'sym6'
804
+ end
805
+
778
806
  end
779
807
 
780
808
 
@@ -46,13 +46,20 @@ module Schemas
46
46
  ### Primary Schema Class ###
47
47
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
48
48
  class AnEnum < Deimos::SchemaClass::Enum
49
- # @return ['sym1', 'sym2']
50
- attr_accessor :an_enum
51
-
52
49
  # @override
53
50
  def symbols
54
51
  %w(sym1 sym2)
55
52
  end
53
+
54
+
55
+ def sym1?
56
+ @value == 'sym1'
57
+ end
58
+
59
+ def sym2?
60
+ @value == 'sym2'
61
+ end
62
+
56
63
  end
57
64
  end
58
65
 
@@ -65,13 +72,20 @@ module Schemas
65
72
  ### Primary Schema Class ###
66
73
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
67
74
  class AnotherEnum < Deimos::SchemaClass::Enum
68
- # @return ['sym3', 'sym4']
69
- attr_accessor :another_enum
70
-
71
75
  # @override
72
76
  def symbols
73
77
  %w(sym3 sym4)
74
78
  end
79
+
80
+
81
+ def sym3?
82
+ @value == 'sym3'
83
+ end
84
+
85
+ def sym4?
86
+ @value == 'sym4'
87
+ end
88
+
75
89
  end
76
90
  end
77
91
 
@@ -1642,13 +1656,20 @@ module Schemas
1642
1656
  ### Primary Schema Class ###
1643
1657
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
1644
1658
  class YetAnotherEnum < Deimos::SchemaClass::Enum
1645
- # @return ['sym5', 'sym6']
1646
- attr_accessor :yet_another_enum
1647
-
1648
1659
  # @override
1649
1660
  def symbols
1650
1661
  %w(sym5 sym6)
1651
1662
  end
1663
+
1664
+
1665
+ def sym5?
1666
+ @value == 'sym5'
1667
+ end
1668
+
1669
+ def sym6?
1670
+ @value == 'sym6'
1671
+ end
1672
+
1652
1673
  end
1653
1674
  end
1654
1675
 
@@ -82,13 +82,20 @@ module Schemas
82
82
 
83
83
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
84
84
  class AnEnum < Deimos::SchemaClass::Enum
85
- # @return ['sym1', 'sym2']
86
- attr_accessor :an_enum
87
-
88
85
  # @override
89
86
  def symbols
90
87
  %w(sym1 sym2)
91
88
  end
89
+
90
+
91
+ def sym1?
92
+ @value == 'sym1'
93
+ end
94
+
95
+ def sym2?
96
+ @value == 'sym2'
97
+ end
98
+
92
99
  end
93
100
 
94
101
 
@@ -746,35 +753,56 @@ module Schemas
746
753
 
747
754
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
748
755
  class AnEnum < Deimos::SchemaClass::Enum
749
- # @return ['sym1', 'sym2']
750
- attr_accessor :an_enum
751
-
752
756
  # @override
753
757
  def symbols
754
758
  %w(sym1 sym2)
755
759
  end
760
+
761
+
762
+ def sym1?
763
+ @value == 'sym1'
764
+ end
765
+
766
+ def sym2?
767
+ @value == 'sym2'
768
+ end
769
+
756
770
  end
757
771
 
758
772
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
759
773
  class AnotherEnum < Deimos::SchemaClass::Enum
760
- # @return ['sym3', 'sym4']
761
- attr_accessor :another_enum
762
-
763
774
  # @override
764
775
  def symbols
765
776
  %w(sym3 sym4)
766
777
  end
778
+
779
+
780
+ def sym3?
781
+ @value == 'sym3'
782
+ end
783
+
784
+ def sym4?
785
+ @value == 'sym4'
786
+ end
787
+
767
788
  end
768
789
 
769
790
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
770
791
  class YetAnotherEnum < Deimos::SchemaClass::Enum
771
- # @return ['sym5', 'sym6']
772
- attr_accessor :yet_another_enum
773
-
774
792
  # @override
775
793
  def symbols
776
794
  %w(sym5 sym6)
777
795
  end
796
+
797
+
798
+ def sym5?
799
+ @value == 'sym5'
800
+ end
801
+
802
+ def sym6?
803
+ @value == 'sym6'
804
+ end
805
+
778
806
  end
779
807
 
780
808
 
@@ -42,13 +42,20 @@ module Schemas; module Com; module MyNamespace
42
42
 
43
43
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
44
44
  class AnEnum < Deimos::SchemaClass::Enum
45
- # @return ['sym1', 'sym2']
46
- attr_accessor :an_enum
47
-
48
45
  # @override
49
46
  def symbols
50
47
  %w(sym1 sym2)
51
48
  end
49
+
50
+
51
+ def sym1?
52
+ @value == 'sym1'
53
+ end
54
+
55
+ def sym2?
56
+ @value == 'sym2'
57
+ end
58
+
52
59
  end
53
60
 
54
61
 
@@ -621,35 +628,56 @@ module Schemas; module Com; module MyNamespace
621
628
 
622
629
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
623
630
  class AnEnum < Deimos::SchemaClass::Enum
624
- # @return ['sym1', 'sym2']
625
- attr_accessor :an_enum
626
-
627
631
  # @override
628
632
  def symbols
629
633
  %w(sym1 sym2)
630
634
  end
635
+
636
+
637
+ def sym1?
638
+ @value == 'sym1'
639
+ end
640
+
641
+ def sym2?
642
+ @value == 'sym2'
643
+ end
644
+
631
645
  end
632
646
 
633
647
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
634
648
  class AnotherEnum < Deimos::SchemaClass::Enum
635
- # @return ['sym3', 'sym4']
636
- attr_accessor :another_enum
637
-
638
649
  # @override
639
650
  def symbols
640
651
  %w(sym3 sym4)
641
652
  end
653
+
654
+
655
+ def sym3?
656
+ @value == 'sym3'
657
+ end
658
+
659
+ def sym4?
660
+ @value == 'sym4'
661
+ end
662
+
642
663
  end
643
664
 
644
665
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
645
666
  class YetAnotherEnum < Deimos::SchemaClass::Enum
646
- # @return ['sym5', 'sym6']
647
- attr_accessor :yet_another_enum
648
-
649
667
  # @override
650
668
  def symbols
651
669
  %w(sym5 sym6)
652
670
  end
671
+
672
+
673
+ def sym5?
674
+ @value == 'sym5'
675
+ end
676
+
677
+ def sym6?
678
+ @value == 'sym6'
679
+ end
680
+
653
681
  end
654
682
 
655
683
 
@@ -42,13 +42,20 @@ module Schemas; module MyNamespace
42
42
 
43
43
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
44
44
  class AnEnum < Deimos::SchemaClass::Enum
45
- # @return ['sym1', 'sym2']
46
- attr_accessor :an_enum
47
-
48
45
  # @override
49
46
  def symbols
50
47
  %w(sym1 sym2)
51
48
  end
49
+
50
+
51
+ def sym1?
52
+ @value == 'sym1'
53
+ end
54
+
55
+ def sym2?
56
+ @value == 'sym2'
57
+ end
58
+
52
59
  end
53
60
 
54
61
 
@@ -666,35 +673,56 @@ module Schemas; module MyNamespace
666
673
 
667
674
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
668
675
  class AnEnum < Deimos::SchemaClass::Enum
669
- # @return ['sym1', 'sym2']
670
- attr_accessor :an_enum
671
-
672
676
  # @override
673
677
  def symbols
674
678
  %w(sym1 sym2)
675
679
  end
680
+
681
+
682
+ def sym1?
683
+ @value == 'sym1'
684
+ end
685
+
686
+ def sym2?
687
+ @value == 'sym2'
688
+ end
689
+
676
690
  end
677
691
 
678
692
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
679
693
  class AnotherEnum < Deimos::SchemaClass::Enum
680
- # @return ['sym3', 'sym4']
681
- attr_accessor :another_enum
682
-
683
694
  # @override
684
695
  def symbols
685
696
  %w(sym3 sym4)
686
697
  end
698
+
699
+
700
+ def sym3?
701
+ @value == 'sym3'
702
+ end
703
+
704
+ def sym4?
705
+ @value == 'sym4'
706
+ end
707
+
687
708
  end
688
709
 
689
710
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
690
711
  class YetAnotherEnum < Deimos::SchemaClass::Enum
691
- # @return ['sym5', 'sym6']
692
- attr_accessor :yet_another_enum
693
-
694
712
  # @override
695
713
  def symbols
696
714
  %w(sym5 sym6)
697
715
  end
716
+
717
+
718
+ def sym5?
719
+ @value == 'sym5'
720
+ end
721
+
722
+ def sym6?
723
+ @value == 'sym6'
724
+ end
725
+
698
726
  end
699
727
 
700
728
 
@@ -46,13 +46,20 @@ module Schemas
46
46
  ### Primary Schema Class ###
47
47
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
48
48
  class AnEnum < Deimos::SchemaClass::Enum
49
- # @return ['sym1', 'sym2']
50
- attr_accessor :an_enum
51
-
52
49
  # @override
53
50
  def symbols
54
51
  %w(sym1 sym2)
55
52
  end
53
+
54
+
55
+ def sym1?
56
+ @value == 'sym1'
57
+ end
58
+
59
+ def sym2?
60
+ @value == 'sym2'
61
+ end
62
+
56
63
  end
57
64
  end
58
65
 
@@ -65,13 +72,20 @@ module Schemas
65
72
  ### Primary Schema Class ###
66
73
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
67
74
  class AnotherEnum < Deimos::SchemaClass::Enum
68
- # @return ['sym3', 'sym4']
69
- attr_accessor :another_enum
70
-
71
75
  # @override
72
76
  def symbols
73
77
  %w(sym3 sym4)
74
78
  end
79
+
80
+
81
+ def sym3?
82
+ @value == 'sym3'
83
+ end
84
+
85
+ def sym4?
86
+ @value == 'sym4'
87
+ end
88
+
75
89
  end
76
90
  end
77
91
 
@@ -1642,13 +1656,20 @@ module Schemas
1642
1656
  ### Primary Schema Class ###
1643
1657
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
1644
1658
  class YetAnotherEnum < Deimos::SchemaClass::Enum
1645
- # @return ['sym5', 'sym6']
1646
- attr_accessor :yet_another_enum
1647
-
1648
1659
  # @override
1649
1660
  def symbols
1650
1661
  %w(sym5 sym6)
1651
1662
  end
1663
+
1664
+
1665
+ def sym5?
1666
+ @value == 'sym5'
1667
+ end
1668
+
1669
+ def sym6?
1670
+ @value == 'sym6'
1671
+ end
1672
+
1652
1673
  end
1653
1674
  end
1654
1675
 
@@ -82,13 +82,20 @@ module Schemas
82
82
 
83
83
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
84
84
  class AnEnum < Deimos::SchemaClass::Enum
85
- # @return ['sym1', 'sym2']
86
- attr_accessor :an_enum
87
-
88
85
  # @override
89
86
  def symbols
90
87
  %w(sym1 sym2)
91
88
  end
89
+
90
+
91
+ def sym1?
92
+ @value == 'sym1'
93
+ end
94
+
95
+ def sym2?
96
+ @value == 'sym2'
97
+ end
98
+
92
99
  end
93
100
 
94
101
 
@@ -746,35 +753,56 @@ module Schemas
746
753
 
747
754
  # Autogenerated Schema for Enum at com.my-namespace.AnEnum
748
755
  class AnEnum < Deimos::SchemaClass::Enum
749
- # @return ['sym1', 'sym2']
750
- attr_accessor :an_enum
751
-
752
756
  # @override
753
757
  def symbols
754
758
  %w(sym1 sym2)
755
759
  end
760
+
761
+
762
+ def sym1?
763
+ @value == 'sym1'
764
+ end
765
+
766
+ def sym2?
767
+ @value == 'sym2'
768
+ end
769
+
756
770
  end
757
771
 
758
772
  # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
759
773
  class AnotherEnum < Deimos::SchemaClass::Enum
760
- # @return ['sym3', 'sym4']
761
- attr_accessor :another_enum
762
-
763
774
  # @override
764
775
  def symbols
765
776
  %w(sym3 sym4)
766
777
  end
778
+
779
+
780
+ def sym3?
781
+ @value == 'sym3'
782
+ end
783
+
784
+ def sym4?
785
+ @value == 'sym4'
786
+ end
787
+
767
788
  end
768
789
 
769
790
  # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
770
791
  class YetAnotherEnum < Deimos::SchemaClass::Enum
771
- # @return ['sym5', 'sym6']
772
- attr_accessor :yet_another_enum
773
-
774
792
  # @override
775
793
  def symbols
776
794
  %w(sym5 sym6)
777
795
  end
796
+
797
+
798
+ def sym5?
799
+ @value == 'sym5'
800
+ end
801
+
802
+ def sym6?
803
+ @value == 'sym6'
804
+ end
805
+
778
806
  end
779
807
 
780
808
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deimos-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner