Sha256: a2119af8c1bc96679bae6884baa2ae084687f61a875b63a8baf4877e01bb2973

Contents?: true

Size: 782 Bytes

Versions: 2

Compression:

Stored size: 782 Bytes

Contents

require "mascot"

module Mascot
  # Contains singletons for rails and some configuration data.
  Configuration = Struct.new(:sitemap, :routes, :parent_engine)

  # Rescued by ActionController to display page not found error.
  PageNotFoundError = Class.new(StandardError)

  autoload :ActionControllerContext,  "mascot/action_controller_context"
  autoload :RailsConfiguration,       "mascot/rails_configuration"
  autoload :RouteConstraint,          "mascot/route_constraint"

  # Default configuration object for Mascot Rails integration.
  def self.configuration
    @configuration ||= RailsConfiguration.new
  end

  def self.configure(&block)
    block.call configuration
  end
end

# This can't be autoloaded; otherwise Rails won't pick up the engine.
require "mascot/engine"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mascot-rails-0.1.7 lib/mascot/rails.rb
mascot-rails-0.1.6 lib/mascot/rails.rb