Sha256: d44765d2319dc3dc9a296e7d7578bd569443993d46cbf82fd1e38a16c07fcd58

Contents?: true

Size: 546 Bytes

Versions: 2

Compression:

Stored size: 546 Bytes

Contents

# frozen_string_literal: true

module Micro::Attributes
  module Features
    module KeysAsSymbol

      module ClassMethods
        def attributes_access
          :symbol
        end

        def __attribute_key_check__(value)
          Kind::Symbol[value]
        end

        def __attribute_key_transform__(value)
          value
        end

        def __attributes_keys_transform__(hash)
          Kind::Hash[hash]
        end
      end

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

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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