class Ransack::Ransacker

def attr_from(bindable)

def attr_from(bindable)
  call(*args.map { |arg| bindable.send(arg) })
end

def initialize(klass, name, opts = {}, &block)

def initialize(klass, name, opts = {}, &block)
  @klass, @name = klass, name
  @type = opts[:type] || :string
  @args = opts[:args] || [:parent]
  @formatter = opts[:formatter]
  @callable = opts[:callable] || block ||
              (@klass.method(name) if @klass.respond_to?(name)) ||
              proc { |parent| parent.table[name] }
end