Class: MundaneSearch::ParamKeyTypes
- Inherits:
-
Object
- Object
- MundaneSearch::ParamKeyTypes
- Defined in:
- lib/mundane-search/param_key_types.rb
Instance Attribute Summary collapse
-
#filter ⇒ Object
readonly
Returns the value of attribute filter.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options, filter) ⇒ ParamKeyTypes
constructor
A new instance of ParamKeyTypes.
- #pairs ⇒ Object
Constructor Details
#initialize(options, filter) ⇒ ParamKeyTypes
Returns a new instance of ParamKeyTypes.
4 5 6 |
# File 'lib/mundane-search/param_key_types.rb', line 4 def initialize(, filter) , @filter = , filter end |
Instance Attribute Details
#filter ⇒ Object (readonly)
Returns the value of attribute filter.
3 4 5 |
# File 'lib/mundane-search/param_key_types.rb', line 3 def filter @filter end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/mundane-search/param_key_types.rb', line 3 def end |
Instance Method Details
#pairs ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/mundane-search/param_key_types.rb', line 8 def pairs kt = key_types option_keys.inject({}) do |hsh, key| hsh[[key]] = kt["#{key}"] || kt[:"#{key}"] hsh end end |