Class: Graticule::Geocoder::Multi::SerialLookup

Inherits:
Object
  • Object
show all
Defined in:
lib/graticule/geocoder/multi.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeSerialLookup

Returns a new instance of SerialLookup.


59
60
61
# File 'lib/graticule/geocoder/multi.rb', line 59

def initialize
  @blocks = []
end

Instance Method Details

#perform(&block) ⇒ Object


63
64
65
# File 'lib/graticule/geocoder/multi.rb', line 63

def perform(&block)
  @blocks << block
end

#resultObject


67
68
69
70
71
72
73
# File 'lib/graticule/geocoder/multi.rb', line 67

def result
  result = nil
  @blocks.detect do |block|
    result = block.call
  end
  result
end