Class: Gorillib::HashWithIndifferentSymbolKeys

Inherits:
HashWithIndifferentAccess show all
Defined in:
lib/gorillib/hash/indifferent_access.rb

Instance Method Summary collapse

Methods inherited from HashWithIndifferentAccess

#[]=, #assoc, #default, #delete, #dup, #extractable_options?, #fetch, #initialize, #key?, #merge, new_from_hash_copying_default, #rassoc, #regular_update, #regular_writer, #reverse_merge, #reverse_merge!, #stringify_keys, #stringify_keys!, #symbolize_keys, #to_hash, #to_options!, #update, #values_at, #with_indifferent_access

Methods inherited from Hash

#extractable_options?, #tree_diff, #with_indifferent_access, zip

Methods included from Gorillib::Hashlike::ReverseMerge

#reverse_merge, #reverse_merge!

Methods included from Gorillib::Hashlike::DeepCompact

#deep_compact!

Methods included from Gorillib::Hashlike::TreeMerge

#tree_merge!

Methods included from Gorillib::Hashlike::DeepMerge

#deep_merge, #deep_merge!

Methods included from Gorillib::Hashlike::Serialization

#to_wire

Methods included from Gorillib::Hashlike::DeepDup

#deep_dup

Methods included from Gorillib::Hashlike::Compact

#compact, #compact!, #compact_blank, #compact_blank!

Methods included from Gorillib::Hashlike::Slice

#slice, #slice!

Methods included from Gorillib::Hashlike::Keys

#assert_valid_keys, #stringify_keys, #stringify_keys!, #symbolize_keys, #symbolize_keys!

Constructor Details

This class inherits a constructor from Gorillib::HashWithIndifferentAccess

Instance Method Details

#convert_key(key) ⇒ Object



178
179
180
181
# File 'lib/gorillib/hash/indifferent_access.rb', line 178

def convert_key key
  return key if key.is_a?(Fixnum)
  key.respond_to?(:to_sym) ? key.to_sym : key
end