Sha256: cf1fde19573e34dbcdbc6c9671714e8fe06a354c43c824959b01263d2ddce4af

Contents?: true

Size: 478 Bytes

Versions: 34

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

34 entries across 34 versions & 1 rubygems

Version Path
lutaml-model-0.5.3 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.5.2 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.5.1 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.5.0 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.4.0 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.30 lib/lutaml/model/yaml_adapter/yaml_object.rb
lutaml-model-0.3.29 lib/lutaml/model/yaml_adapter/yaml_object.rb
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