Sha256: 925303064c35ab1a6e6d43593caff1e594376e3bba369190f59ab355092ab03f

Contents?: true

Size: 425 Bytes

Versions: 1

Compression:

Stored size: 425 Bytes

Contents

# frozen_string_literal: true

require_relative 'attribute_set/builder'

module LightweightAttributes
  class AttributeSet
    delegate :each_value, :fetch, :except, :[], :[]=, :key?, :keys, to: :attributes

    def initialize(attributes)
      @attributes = attributes
    end

    def fetch_value(name)
      self[name]
    end

    def to_hash
      @attributes
    end

    private

    attr_reader :attributes
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lightweight_attributes-0.2.0 lib/lightweight_attributes/attribute_set.rb