class Pandoc::IncludeFilter::IncludedFile
Public Class Methods
new(path)
click to toggle source
# File lib/pandoc/include_filter/included_file.rb, line 8 def initialize(path) @path = path end
Public Instance Methods
pathname()
click to toggle source
# File lib/pandoc/include_filter/included_file.rb, line 12 def pathname Pathname(clean_path(@path)).expand_path end
Private Instance Methods
clean_path(raw_path)
click to toggle source
# File lib/pandoc/include_filter/included_file.rb, line 18 def clean_path(raw_path) raw_path.gsub(/\\_/, '_').tap do |path| path.slice!(0) if path.start_with?('"', "'") path.slice!(-1) if path.end_with?('"', "'") end end