Class: Lutaml::Yamls::Adapter::YamlsSequence

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/yamls/adapter/yamls_sequence.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeYamlsSequence

Returns a new instance of YamlsSequence.



9
10
11
# File 'lib/lutaml/yamls/adapter/yamls_sequence.rb', line 9

def initialize
  @rules = []
end

Instance Attribute Details

#rulesObject (readonly)

Returns the value of attribute rules.



7
8
9
# File 'lib/lutaml/yamls/adapter/yamls_sequence.rb', line 7

def rules
  @rules
end

Instance Method Details

#map_document(position, to:, type:, collection: false) ⇒ Object



13
14
15
16
# File 'lib/lutaml/yamls/adapter/yamls_sequence.rb', line 13

def map_document(position, to:, type:, collection: false)
  @rules << YamlsSequenceRule.new(position, to: to, type: type,
                                            collection: collection)
end