Sha256: cf1fde19573e34dbcdbc6c9671714e8fe06a354c43c824959b01263d2ddce4af

Contents?: true

Size: 478 Bytes

Versions: 27

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

module Lutaml
  module Model
    module YamlAdapter
      # Base class for YAML objects
      class YamlObject
        attr_reader :attributes

        def initialize(attributes = {})
          @attributes = attributes
        end

        def [](key)
          @attributes[key]
        end

        def []=(key, value)
          @attributes[key] = value
        end

        def to_h
          @attributes
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
lutaml-model-0.3.28 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.27 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.26 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.25 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.24 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.23 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.22 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.21 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.20 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.19 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.18 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.17 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.16 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.15 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.14 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.13 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.12 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.11 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.10 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.9 lib/lutaml/model/yaml_adapter/yaml_object.rb