module Roda::RodaPlugins::Path
def self.configure(app, opts=OPTS)
:by_name :: Register classes by name, which is friendlier when reloading code (defaults to
Initialize the path classes when loading the plugin. Options:
def self.configure(app, opts=OPTS) app.instance_eval do self.opts[:path_class_by_name] = opts.fetch(:by_name, ENV['RACK_ENV'] == 'development') self.opts[:path_classes] ||= {} self.opts[:path_class_methods] ||= {} unless path_block(String) path(String){|str| str} end end end