Sha256: 88a30bbef248bebd445b82d7f7d44627552562a9893dca52cdf6c84b98e7dd21
Contents?: true
Size: 328 Bytes
Versions: 5
Compression:
Stored size: 328 Bytes
Contents
module ApiTaster class RouteCollector cattr_accessor :routes self.routes = [] def self.collect(path) self.routes = [] Dir["#{path}/**/*.rb"].each { |file| load(file) } Route.mappings = Proc.new do RouteCollector.routes.each { |route| instance_eval(&route) } end end end end
Version data entries
5 entries across 5 versions & 1 rubygems