Class: ActiveRecord::PredicateBuilder::BaseHandler

Inherits:
Object
  • Object
show all
Defined in:
activerecord/lib/active_record/relation/predicate_builder/base_handler.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(predicate_builder) ⇒ BaseHandler

Returns a new instance of BaseHandler.



6
7
8
# File 'activerecord/lib/active_record/relation/predicate_builder/base_handler.rb', line 6

def initialize(predicate_builder)
  @predicate_builder = predicate_builder
end

Instance Method Details

#call(attribute, value) ⇒ Object



10
11
12
# File 'activerecord/lib/active_record/relation/predicate_builder/base_handler.rb', line 10

def call(attribute, value)
  predicate_builder.build(attribute, value.id)
end