module Roda::RodaPlugins::HashRoutes::ClassMethods
Public Instance Methods
Source
# File lib/roda/plugins/hash_routes.rb, line 269 def freeze opts[:hash_routes_methods].freeze super end
Freeze the hash_routes
metadata when freezing the app.
Calls superclass method
Source
# File lib/roda/plugins/hash_routes.rb, line 278 def hash_routes(namespace='', &block) dsl = DSL.new(self, namespace) if block if block.arity == 1 yield dsl else dsl.instance_exec(&block) end end dsl end
Invoke the DSL
for configuring hash routes, see DSL
for methods inside the block. If the block accepts an argument, yield the DSL
instance. If the block does not accept an argument, instance_exec the block in the context of the DSL
instance.