Module: Roda::RodaPlugins::StripPathPrefix::ClassMethods

Defined in:
lib/roda/plugins/strip_path_prefix.rb

Instance Method Summary collapse

Instance Method Details

#expand_path(path, root = ) ⇒ Object

Strip the path prefix from the gien path if it starts with the prefix.



25
26
27
# File 'lib/roda/plugins/strip_path_prefix.rb', line 25

def expand_path(path, root=opts[:root])
  super.sub(opts[:strip_path_prefix], '')
end