Method: Jekyll::Tags::IncludeTag#realpath_prefixed_with?

Defined in:
lib/jekyll/tags/include.rb

#realpath_prefixed_with?(path, dir) ⇒ Boolean

Returns:

  • (Boolean)


168
169
170
171
172
# File 'lib/jekyll/tags/include.rb', line 168

def realpath_prefixed_with?(path, dir)
  File.exist?(path) && File.realpath(path).start_with?(dir)
rescue StandardError
  false
end