Sha256: 0f551a9bd7dfb7b8135d2fef9f7efb484735998fb46ff98bf88046f65bb75a02

Contents?: true

Size: 538 Bytes

Versions: 1

Compression:

Stored size: 538 Bytes

Contents

# frozen_string_literal: true

module Micro::Attributes
  module Features
    module KeysAsSymbol

      module ClassMethods
        def attributes_access
          :symbol
        end

        def __attribute_access__(value)
          Kind::Of.(::Symbol, value)
        end

        def __attribute_key__(value)
          value
        end

        def __attributes_keys__(hash)
          Utils::Hashes.kind(hash)
        end
      end

      def self.included(base)
        base.send(:extend, ClassMethods)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
u-attributes-2.4.0 lib/micro/attributes/features/keys_as_symbol.rb