Class: Plucky::Normalizers::OptionsHashKey
- Defined in:
- lib/plucky/normalizers/options_hash_key.rb
Constant Summary collapse
- NormalizedKeys =
Internal: Keys with values that they should normalize to
{ :order => :sort, :select => :fields, :offset => :skip, :id => :_id, }
Instance Method Summary collapse
-
#call(key) ⇒ Object
Public: Normalizes an options hash key.
Instance Method Details
#call(key) ⇒ Object
Public: Normalizes an options hash key
key - The key to normalize
Returns a Symbol.
18 19 20 |
# File 'lib/plucky/normalizers/options_hash_key.rb', line 18 def call(key) NormalizedKeys.fetch key.to_sym, key end |