Module: WhurlEngine
- Defined in:
- lib/whurl_engine/config.rb,
lib/whurl_engine.rb,
lib/whurl_engine/engine.rb,
lib/whurl_engine/version.rb,
lib/whurl_engine/extension.rb,
app/models/whurl_engine/story.rb,
app/models/whurl_engine/whurl.rb,
app/models/whurl_engine/chapter.rb,
app/models/whurl_engine/category.rb,
app/models/whurl_engine/resource.rb,
app/models/whurl_engine/header_definition.rb,
app/helpers/whurl_engine/application_helper.rb,
app/models/whurl_engine/parameter_definition.rb,
app/controllers/whurl_engine/whurls_controller.rb,
app/controllers/whurl_engine/stories_controller.rb,
app/controllers/whurl_engine/chapters_controller.rb,
app/controllers/whurl_engine/resources_controller.rb,
app/controllers/whurl_engine/categories_controller.rb,
app/controllers/whurl_engine/application_controller.rb,
lib/whurl_engine/extensions/cancan/authorization_adapter.rb,
app/controllers/whurl_engine/header_definitions_controller.rb,
app/controllers/whurl_engine/parameter_definitions_controller.rb
Overview
much lifted from RailsAdmin github.com/sferik/rails_admin
Defined Under Namespace
Modules: ApplicationHelper, Config, Extensions Classes: ApplicationController, CategoriesController, Category, Chapter, ChaptersController, Engine, HeaderDefinition, HeaderDefinitionsController, ParameterDefinition, ParameterDefinitionsController, Resource, ResourcesController, StoriesController, Story, Whurl, WhurlsController
Constant Summary collapse
- VERSION =
"2.2.0"
- EXTENSIONS =
[]
- AUTHORIZATION_ADAPTERS =
{}
Class Method Summary collapse
-
.add_extension(extension_key, extension_definition) ⇒ Object
Extend WhurlEngine.
- .config(&block) ⇒ Object
Class Method Details
.add_extension(extension_key, extension_definition) ⇒ Object
Extend WhurlEngine
The extension may define various adapters (e.g., for authorization) and register those via the options hash.
9 10 11 12 |
# File 'lib/whurl_engine/extension.rb', line 9 def self.add_extension(extension_key, extension_definition) EXTENSIONS << extension_key AUTHORIZATION_ADAPTERS[extension_key] = extension_definition::AuthorizationAdapter end |
.config(&block) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/whurl_engine.rb', line 7 def self.config(&block) if block_given? block.call(WhurlEngine::Config) else WhurlEngine::Config end end |