module Jekyll::AsciiDoc::Utils

Constants

MessageTopic
NewLine

Public Instance Methods

has_front_matter?(dlg_method, asciidoc_ext_rx, path) click to toggle source

Checks whether the file at the specified path has front matter. For AsciiDoc files, this method always returns true. Otherwise, it delegates to {::Jekyll::Utils.has_yaml_header?}.

@param dlg_method [Method] the delegate method to call if this path is not an AsciiDoc file. @param asciidoc_ext_rx [Regexp] the regular expression to use to check if this path is an AsciiDoc file. @param path [String] the path to check.

@return [Boolean] whether the file at this path has front matter.

# File lib/jekyll-asciidoc/utils.rb, line 17
def has_front_matter? dlg_method, asciidoc_ext_rx, path
  (asciidoc_ext_rx.match? ::File.extname path) || (dlg_method.call path)
end