Top Level Namespace

Defined Under Namespace

Modules: Texticle

Constant Summary collapse

Searchable =
Texticle

Instance Method Summary collapse

Instance Method Details

#Searchable(*searchable_columns) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/texticle/searchable.rb', line 3

def Searchable(*searchable_columns)
  Module.new do

    include Texticle

    define_method(:searchable_columns) do
      searchable_columns.map(&:to_s)
    end

    private :searchable_columns

    def indexable_columns
      searchable_columns.to_enum
    end
  end
end