Class: Lutaml::Model::Schema::Decorators::Choices
- Inherits:
-
Object
- Object
- Lutaml::Model::Schema::Decorators::Choices
- Defined in:
- lib/lutaml/model/schema/decorators/choices.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #choice? ⇒ Boolean
-
#initialize(attributes) ⇒ Choices
constructor
Decorates a collection of choice attributes.
- #polymorphic? ⇒ Boolean
Constructor Details
#initialize(attributes) ⇒ Choices
Decorates a collection of choice attributes. This class is used to handle attributes that are part of a choice constraint in a JSON schema. It provides a way to access the choice attributes in a structured manner.
14 15 16 |
# File 'lib/lutaml/model/schema/decorators/choices.rb', line 14 def initialize(attributes) @attributes = attributes.values end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
8 9 10 |
# File 'lib/lutaml/model/schema/decorators/choices.rb', line 8 def attributes @attributes end |
Instance Method Details
#choice? ⇒ Boolean
18 19 20 |
# File 'lib/lutaml/model/schema/decorators/choices.rb', line 18 def choice? true end |
#polymorphic? ⇒ Boolean
22 23 24 |
# File 'lib/lutaml/model/schema/decorators/choices.rb', line 22 def polymorphic? false end |