Sha256: f1cfd84a20fa4fff465b4ca3fec8c9a376692745286f71cb6f9fc822b05fb0b5
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 Bytes
Contents
module Hisyo class Application < Sinatra::Base end def self.env @env ||= ENV["RACK_ENV"] ||= "development" end def self.setup bootrb = caller.first.split(/:[0-9]+:/).first approot = bootrb.gsub("/config/boot.rb", "") %w!config lib app!.each do |dir| Dir.glob("#{approot}/#{dir}/**/*.rb") do |file| require file end end Hisyo::Application.instance_eval do set :root, approot set :views, File.join(approot, "app/views") set :public_folder, File.join(approot, "public") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hisyo-0.0.3 | lib/hisyo/application.rb |