Sha256: e4d0904bc10705feeaf560bdb34a0e87b9b639be772ca09cb2efb6cb987ff434

Contents?: true

Size: 686 Bytes

Versions: 5

Compression:

Stored size: 686 Bytes

Contents

# Note that all components in base_controller/*.rb are loaded automatically, from
# config/routes.rb, **after** this file is loaded. See the end of this file.

require "sinatra/base"
::Sinatra::Request.include(::Simple::Httpd::Helpers::RequestHeader)

class Simple::Httpd::BaseController < Sinatra::Base
  set :logging, true

  extend Simple::Httpd::Reloader

  def dispatch!
    self.class.reload! if ::Simple::Httpd.env == "development"

    super
  end
end

require_relative "./route"

class Simple::Httpd::BaseController
  extend ::Simple::Httpd::RouteDescriptions
end

Dir.chdir __dir__ do
  Dir.glob("base_controller/*.rb").sort.each do |file|
    require_relative file
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simple-httpd-0.4.3 lib/simple/httpd/base_controller.rb
simple-httpd-0.4.2 lib/simple/httpd/base_controller.rb
simple-httpd-0.4.1 lib/simple/httpd/base_controller.rb
simple-httpd-0.4.0 lib/simple/httpd/base_controller.rb
simple-httpd-0.3.5 lib/simple/httpd/base_controller.rb