Module: Impression
- Defined in:
- lib/impression.rb,
lib/impression/app.rb,
lib/impression/errors.rb,
lib/impression/version.rb,
lib/impression/rack_app.rb,
lib/impression/resource.rb,
lib/impression/file_tree.rb,
lib/impression/file_watcher.rb,
lib/impression/request_extensions/routing.rb,
lib/impression/request_extensions/responses.rb
Overview
The Impression module contains convenience methods for creating resources.
Defined Under Namespace
Modules: RequestExtensions Classes: App, BaseError, FileTree, FileWatcher, NotFoundError, RackApp, Resource
Constant Summary collapse
- VERSION =
'0.16'
Class Method Summary collapse
-
.app(path: '/', **props, &block) ⇒ Impression::App
Creates a new ‘Impression::App` instance with the given parameters.
-
.file_tree(path: '/', **props, &block) ⇒ Impression::FileTree
Creates a new ‘Impression::FileTree` instance with the given parameters.
-
.rack_app(path: '/', **props, &block) ⇒ Impression::RackApp
Creates a new ‘Impression::RackApp` instance with the given parameters.
-
.resource(path: '/', **props, &block) ⇒ Impression::Resource
Creates a new ‘Impression::Resource` instance with the given parameters and block.
Class Method Details
.app(path: '/', **props, &block) ⇒ Impression::App
Creates a new ‘Impression::App` instance with the given parameters.
41 42 43 |
# File 'lib/impression.rb', line 41 def self.app(path: '/', **props, &block) App.new(path: path, **props, &block) end |
.file_tree(path: '/', **props, &block) ⇒ Impression::FileTree
Creates a new ‘Impression::FileTree` instance with the given parameters.
31 32 33 |
# File 'lib/impression.rb', line 31 def self.file_tree(path: '/', **props, &block) FileTree.new(path: path, **props, &block) end |
.rack_app(path: '/', **props, &block) ⇒ Impression::RackApp
Creates a new ‘Impression::RackApp` instance with the given parameters.
51 52 53 |
# File 'lib/impression.rb', line 51 def self.rack_app(path: '/', **props, &block) RackApp.new(path: path, **props, &block) end |
.resource(path: '/', **props, &block) ⇒ Impression::Resource
Creates a new ‘Impression::Resource` instance with the given parameters and block.
21 22 23 |
# File 'lib/impression.rb', line 21 def self.resource(path: '/', **props, &block) Resource.new(path: path, **props, &block) end |