Class: Admino::Query::Configuration::SearchField
- Inherits:
-
Object
- Object
- Admino::Query::Configuration::SearchField
- Defined in:
- lib/admino/query/configuration.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #coerce_to ⇒ Object
- #default_value ⇒ Object
-
#initialize(name, options = {}) ⇒ SearchField
constructor
A new instance of SearchField.
Constructor Details
#initialize(name, options = {}) ⇒ SearchField
Returns a new instance of SearchField.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/admino/query/configuration.rb', line 8 def initialize(name, = {}) .symbolize_keys! .assert_valid_keys( :coerce, :default ) @name = name.to_sym = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/admino/query/configuration.rb', line 5 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/admino/query/configuration.rb', line 6 def end |
Instance Method Details
#coerce_to ⇒ Object
23 24 25 26 27 |
# File 'lib/admino/query/configuration.rb', line 23 def coerce_to if [:coerce] [:coerce].to_sym end end |
#default_value ⇒ Object
19 20 21 |
# File 'lib/admino/query/configuration.rb', line 19 def default_value [:default] end |