Module: Awestruct::Extensions::Relative

Defined in:
lib/awestruct/extensions/relative.rb

Instance Method Summary collapse

Instance Method Details

#relative(href) ⇒ Object



6
7
8
# File 'lib/awestruct/extensions/relative.rb', line 6

def relative(href)
  Pathname.new(href).relative_path_from(Pathname.new(File.dirname(page.output_path))).to_s
end