Public Instance methods
freeze()
Freeze the hash_routes metadata when freezing the app.
[show source]
# File lib/roda/plugins/hash_routes.rb 271 def freeze 272 hash_routes_methods.freeze 273 super 274 end
hash_routes(namespace='', &block)
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.
[show source]
# File lib/roda/plugins/hash_routes.rb 280 def hash_routes(namespace='', &block) 281 dsl = DSL.new(self, namespace) 282 if block 283 if block.arity == 1 284 yield dsl 285 else 286 dsl.instance_exec(&block) 287 end 288 end 289 290 dsl 291 end