Class: ParamsReady::Helpers::ArelBuilder::Table::Callable

Inherits:
Callable
  • Object
show all
Defined in:
lib/params_ready/helpers/arel_builder.rb

Instance Method Summary collapse

Methods inherited from Callable

#to_arel

Constructor Details

#initialize(proc, table_alias) ⇒ Callable

Returns a new instance of Callable.



105
106
107
108
# File 'lib/params_ready/helpers/arel_builder.rb', line 105

def initialize(proc, table_alias)
  super proc
  @table_alias = table_alias
end

Instance Method Details

#to_literal(string) ⇒ Object



110
111
112
# File 'lib/params_ready/helpers/arel_builder.rb', line 110

def to_literal(string)
  Helpers::ArelBuilder::Table.instance(string, table_alias: @table_alias)
end