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.



74
75
76
# File 'lib/global_id/locator.rb', line 74

def initialize(block)
  @locator = block
end

Instance Method Details

#locate(gid) ⇒ Object



78
79
80
# File 'lib/global_id/locator.rb', line 78

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