File: find_generator_instance.rb

package info (click to toggle)
ruby-jekyll-asciidoc 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,536 kB
  • sloc: ruby: 1,802; sh: 36; makefile: 6
file content (8 lines) | stat: -rw-r--r-- 332 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
module Jekyll
  class Site
    # Introduce complement to {::Jekyll::Site#find_converter_instance} for generators.
    def find_generator_instance type
      generators.find {|candidate| type === candidate } || (raise %(No Generators found for #{type}))
    end
  end
end unless Jekyll::Site.method_defined? :find_generator_instance