Class: Lutaml::Model::Schema::Definitions::Choice

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/model/schema/definitions/choice.rb

Overview

A choice do ... end block. Alternatives may be Attribute, Sequence, or nested Choice specs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alternatives:, header:) ⇒ Choice

Returns a new instance of Choice.



12
13
14
15
# File 'lib/lutaml/model/schema/definitions/choice.rb', line 12

def initialize(alternatives:, header:)
  @alternatives = alternatives
  @header = header
end

Instance Attribute Details

#alternativesObject

Returns the value of attribute alternatives.



10
11
12
# File 'lib/lutaml/model/schema/definitions/choice.rb', line 10

def alternatives
  @alternatives
end

#headerObject

Returns the value of attribute header.



10
11
12
# File 'lib/lutaml/model/schema/definitions/choice.rb', line 10

def header
  @header
end