Sha256: fb31f83bca7bff2abb327fb4bc673f533a761d0d8c832c344a1906e09a4f8474
Contents?: true
Size: 500 Bytes
Versions: 54
Compression:
Stored size: 500 Bytes
Contents
module Para module Plugins class Routes attr_reader :router def initialize(router) @router = router end def plugin(identifier, &block) # Store router reference in closure to allow accessing it from # inside the below block router = self.router router.instance_eval do scope module: [:para, identifier].join('/').to_sym do router.instance_eval(&block) end end end end end end
Version data entries
54 entries across 54 versions & 1 rubygems