Method: ActiveRecord::StatementCache::BindMap#initialize

Defined in:
lib/active_record/statement_cache.rb

#initialize(bind_values) ⇒ BindMap

Returns a new instance of BindMap.



70
71
72
73
74
75
76
77
78
79
# File 'lib/active_record/statement_cache.rb', line 70

def initialize(bind_values)
  @indexes   = []
  @bind_values = bind_values

  bind_values.each_with_index do |(_, value), i|
    if Substitute === value
      @indexes << i
    end
  end
end