Sha256: fb65a5c189efecd82cf32d5a79fcf6e38b2308cc5e3981c5d9c6b63edb529af4

Contents?: true

Size: 974 Bytes

Versions: 4

Compression:

Stored size: 974 Bytes

Contents

require 'rack'
require 'tilt'
require 'json'
require 'mime-types'
require 'class_config'
require 'forwardable'
require 'logger'

require_relative 'web/route'
require_relative 'web/router'
require_relative 'web/endpoint'
require_relative 'web/application'
require_relative 'web/template'
require_relative 'web/view_context'
require_relative 'web/render'
require_relative 'web/request'
require_relative 'web/controller'
require_relative 'web/channel'
require_relative 'web/stream'
require_relative 'web/server_sent_event'
require_relative 'web/version'

module Rasti
  module Web
    ROUTE_PARAMS = 'rack.request.route_params'

    extend ClassConfig

    attr_config :views_path, File.join(Dir.pwd, 'views')
    attr_config :template_engines, [:erb]
    attr_config :default_layout, 'layout'
    attr_config :helpers, []
    attr_config :logger, Logger.new(STDOUT)

    after_config do |config|
      config.helpers.each { |h| ViewContext.send :include, h }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rasti-web-0.0.7 lib/rasti/web.rb
rasti-web-0.0.6 lib/rasti/web.rb
rasti-web-0.0.5 lib/rasti/web.rb
rasti-web-0.0.4 lib/rasti/web.rb