Module: AppEngine::Mappable::ClassMethods

Defined in:
lib/appengine-mapreduce/mappable.rb

Instance Method Summary collapse

Instance Method Details

#async_map(name = nil, &block) ⇒ Object



9
10
11
12
13
14
# File 'lib/appengine-mapreduce/mappable.rb', line 9

def async_map name = nil, &block
  default_name = DataMapper.repository.adapter.kind(self)
  job = AppEngine::MapReduce::Job.new(:input_kind => name || default_name)
  job.map = block
  job.run
end