Module: Roda::RodaPlugins::StripPathPrefix::ClassMethods
- Defined in:
- lib/roda/plugins/strip_path_prefix.rb
Instance Method Summary collapse
-
#expand_path(path, root = ) ⇒ Object
Strip the path prefix from the gien path if it starts with the prefix.
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 (path, root=opts[:root]) super.sub(opts[:strip_path_prefix], '') end |