Class: Kiba::Extend::Utils::Lookup::RowSelector

Inherits:
Object
  • Object
show all
Defined in:
lib/kiba/extend/utils/lookup/row_selector.rb

Class Method Summary collapse

Class Method Details

.call(conditions: {}, sep: nil) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/kiba/extend/utils/lookup/row_selector.rb', line 9

def call(conditions: {}, sep: nil)
  if conditions.is_a?(Hash)
    Kiba::Extend::Utils::Lookup::RowSelectorByHash.new(
      conditions: conditions,
      sep: sep
    )
  elsif conditions.lambda?
    Kiba::Extend::Utils::Lookup::RowSelectorByLambda.new(
      conditions: conditions,
      sep: sep
    )

  end
end