Sha256: 6891e7fc1c6419a339066bd89ddaeb2b0598c114f2865186f2d9d04860c5c9ff
Contents?: true
Size: 337 Bytes
Versions: 29
Compression:
Stored size: 337 Bytes
Contents
require 'sinatra' class ApplicationController < Sinatra::Base; end module Eucalypt def self.Controller(route:) name = File.basename(caller[0][/[^:]+/],'.*').camelize Object.const_set name, Class.new(::ApplicationController) name.constantize.instance_eval %{def router() "#{route}" end} ::ApplicationController end end
Version data entries
29 entries across 29 versions & 1 rubygems