Class: ShellEv::UnionTypeLookUp
- Inherits:
-
Object
- Object
- ShellEv::UnionTypeLookUp
- Includes:
- CoreLibrary
- Defined in:
- lib/shell_ev/utilities/union_type_lookup.rb
Overview
The ‘UnionTypeLookUp` class serves as a utility class for storing and managing type combinator templates. It acts as a container for the templates used in handling various oneof/anyof instances within the sdk.
Class Method Summary collapse
-
.get(name) ⇒ Object
rubocop:enable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation.
-
.union_types ⇒ Object
rubocop:disable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation.
Class Method Details
.get(name) ⇒ Object
rubocop:enable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
52 53 54 |
# File 'lib/shell_ev/utilities/union_type_lookup.rb', line 52 def self.get(name) UnionTypeLookUp.union_types[name] end |
.union_types ⇒ Object
rubocop:disable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/shell_ev/utilities/union_type_lookup.rb', line 13 def self.union_types { :LocationMarkerV2 => OneOf.new( [ LeafType.new(SingleLocationMarkerV2, UnionTypeContext.new( discriminator_value: 'SingleLocation', discriminator: 'markerType' )), LeafType.new(MultiLocationMarkerV2, UnionTypeContext.new( discriminator_value: 'MultiLocation', discriminator: 'markerType' )) ], UnionTypeContext.new( is_array: true, is_optional: true ) ), :LocationMarker => OneOf.new( [ LeafType.new(SingleLocationMarker, UnionTypeContext.new( discriminator_value: 'SingleLocation', discriminator: 'markerType' )), LeafType.new(MultiLocationMarker, UnionTypeContext.new( discriminator_value: 'MultiLocation', discriminator: 'markerType' )) ], UnionTypeContext.new( is_array: true, is_optional: true ) ) } end |