Class: GlobalID::Locator::BlockLocator
- Inherits:
-
Object
- Object
- GlobalID::Locator::BlockLocator
- Defined in:
- lib/global_id/locator.rb
Instance Method Summary collapse
-
#initialize(block) ⇒ BlockLocator
constructor
A new instance of BlockLocator.
- #locate(gid) ⇒ Object
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 |