Class: AjaxDatatablesRails::Datatable::SimpleSearch

Inherits:
Object
  • Object
show all
Defined in:
lib/ajax-datatables-rails/datatable/simple_search.rb

Constant Summary collapse

TRUE_VALUE =
'true'

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ SimpleSearch

Returns a new instance of SimpleSearch.



9
10
11
# File 'lib/ajax-datatables-rails/datatable/simple_search.rb', line 9

def initialize(options = {})
  @options = options
end

Instance Method Details

#regexp?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/ajax-datatables-rails/datatable/simple_search.rb', line 17

def regexp?
  @options[:regex] == TRUE_VALUE
end

#valueObject



13
14
15
# File 'lib/ajax-datatables-rails/datatable/simple_search.rb', line 13

def value
  @options[:value]
end