Class: Admino::Query::Configuration::SearchField

Inherits:
Object
  • Object
show all
Defined in:
lib/admino/query/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  options.symbolize_keys!
  options.assert_valid_keys(:coerce)

  @name = name.to_sym

  if coerce_to = options[:coerce]
    @coerce_to = coerce_to.to_sym
  end
end

Instance Attribute Details

#coerce_toObject (readonly)

Returns the value of attribute coerce_to.



6
7
8
# File 'lib/admino/query/configuration.rb', line 6

def coerce_to
  @coerce_to
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/admino/query/configuration.rb', line 5

def name
  @name
end