Method: Innate::Node#find_provide
- Defined in:
- lib/innate/node.rb
#find_provide(path) ⇒ Array
Resolve possible provides for the given path from #provides.
431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/innate/node.rb', line 431 def find_provide(path) pr = provides name, wish, engine = path, 'html', pr['html_handler'] pr.find do |key, value| key = key[/(.*)_handler$/, 1] next unless path =~ /^(.+)\.#{key}$/i name, wish, engine = $1, key, value end return name, wish, engine end |