Class: GlobalID::Locator::BlockLocator

Inherits:
Object
  • Object
show all
Defined in:
lib/global_id/locator.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ BlockLocator

Returns a new instance of BlockLocator.


174
175
176
# File 'lib/global_id/locator.rb', line 174

def initialize(block)
  @locator = block
end

Instance Method Details

#locate(gid) ⇒ Object


178
179
180
# File 'lib/global_id/locator.rb', line 178

def locate(gid)
  @locator.call(gid)
end

#locate_many(gids, options = {}) ⇒ Object


182
183
184
# File 'lib/global_id/locator.rb', line 182

def locate_many(gids, options = {})
  gids.map { |gid| locate(gid) }
end