Sha256: a9e6d227326f2d29d20a9ac4e5e7075dbeb494837b370bbc2c41766184a63c8d

Contents?: true

Size: 321 Bytes

Versions: 4

Compression:

Stored size: 321 Bytes

Contents

module Plucky
  module Normalizers
    class HashKey

      def initialize(keys)
        @keys = keys
      end

      # Public: Normalizes an options hash key
      #
      # key - The key to normalize
      #
      # Returns a Symbol.
      def call(key)
        @keys.fetch key.to_sym, key
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
plucky-0.8.0 lib/plucky/normalizers/hash_key.rb
plucky-0.7.0 lib/plucky/normalizers/hash_key.rb
plucky-0.6.6 lib/plucky/normalizers/hash_key.rb
plucky-0.6.5 lib/plucky/normalizers/hash_key.rb