Module: ModNormalizedHash::OverrideMethods

Included in:
NormalizedHash
Defined in:
lib/doodle/normalized_hash.rb

Overview

in normal usage, these are the only methods you should need to override

Instance Method Summary collapse

Instance Method Details

#normalize_key(k) ⇒ Object

override this method to normalize key, e.g. to normalize keys to strings:

def normalize_key(k)
  k.to_s
end


200
201
202
# File 'lib/doodle/normalized_hash.rb', line 200

def normalize_key(k)
  k
end

#normalize_value(v) ⇒ Object

override this method to normalize value, e.g. to normalize values to strings:

def normalize_value(v)
  v.to_s
end


210
211
212
# File 'lib/doodle/normalized_hash.rb', line 210

def normalize_value(v)
  v
end