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, options = {}) ⇒ Object
- #locate_many(gids, options = {}) ⇒ Object
Constructor Details
#initialize(block) ⇒ BlockLocator
Returns a new instance of BlockLocator.
229 230 231 |
# File 'lib/global_id/locator.rb', line 229 def initialize(block) @locator = block end |
Instance Method Details
#locate(gid, options = {}) ⇒ Object
233 234 235 |
# File 'lib/global_id/locator.rb', line 233 def locate(gid, = {}) @locator.call(gid, ) end |
#locate_many(gids, options = {}) ⇒ Object
237 238 239 |
# File 'lib/global_id/locator.rb', line 237 def locate_many(gids, = {}) gids.map { |gid| locate(gid, ) } end |