Sha256: 712e858acf082a09cd3a9cd94641e3d30a574b0d6807a8dc04f7a63bac373bdf

Contents?: true

Size: 494 Bytes

Versions: 1

Compression:

Stored size: 494 Bytes

Contents

# Feel free to rename from "MyApp" to anything
# if so, remember changing config.ru, config/boot.rb
class MyApp < Sinatra::Application
  set :root, File.expand_path("../../", __FILE__)
  set :views, File.join(root, "app/views")
  set :public_folder, File.join(root, "public")

  def self.controllers(&block)
    instance_eval &block
  end

  def self.setup
    %w!config lib app!.each do |dir|
      Dir.glob("#{root}/#{dir}/**/*.rb") do |file|
        require file
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hisyo-0.1.0 data/generators/project/app/app.rb