def look_up_table(lut_key, options = {}, &block)
      options = {
        :batch_size     => 10000,
        :prefix         => "#{self.name}/",
        :read_on_init   => false,
        :use_cache      => true,
        :sql_mode       => true,
        :where          => nil
      }.merge(options)

      self.lut_set_proc(lut_key, block)
      self.lut_set_options(lut_key, options)

      self.lut(lut_key) if options[:read_on_init]
    end
def look_up_table(lut_key, options = {}, &block)
      options = {
        :batch_size     => 10000,
        :prefix         => "#{self.name}/",
        :read_on_init   => false,
        :use_cache      => true,
        :sql_mode       => true,
        :where          => nil
      }.merge(options)

      self.lut_set_proc(lut_key, block)
      self.lut_set_options(lut_key, options)

      self.lut(lut_key) if options[:read_on_init]
    end
== Defining LookUpTables

   # Sample class:
   Foobar(id: integer, foo: string, bar: integer)

 === Simplest way to define a LookUpTable:
   look_up_table :id
   look_up_table :foo
   look_up_table :bar

 === Add some options to your LookUpTable:
   look_up_table :foo, :batch_size => 5000, :where => "id > 10000"

 === Pass a block to define the LUT manually
   look_up_table :foo do |lut, foobar|
     lut[foobar.foo] = foobar.id
   end

 === Turn off AutoFinder and completly define the whole LUT yourself:
   look_up_table :foo, :sql_mode => false do |lut|
     Foobar.where("id > 10000").each do |foobar|
       lut[foobar.foo] = foobar.id
     end
   end