Module: Mobb
- Defined in:
- lib/mobb/base.rb,
lib/mobb/main.rb,
lib/mobb/version.rb
Defined Under Namespace
Modules: Delegator Classes: Application, Base, Matcher
Constant Summary collapse
- VERSION =
"0.5.1"
Class Method Summary collapse
-
.helpers(*extensions, &block) ⇒ Object
Include the helper modules provided in Mobb’s request context.
-
.new(base = Base, &block) ⇒ Object
Create a new Mobb application; the block is evaluated in the class scope.
-
.register(*extensions, &block) ⇒ Object
Extend the top-level DSL with the modules provided.
-
.use(*args, &block) ⇒ Object
Use the middleware for classic applications.
Class Method Details
.helpers(*extensions, &block) ⇒ Object
Include the helper modules provided in Mobb’s request context.
543 544 545 |
# File 'lib/mobb/base.rb', line 543 def self.helpers(*extensions, &block) Delegator.target.helpers(*extensions, &block) end |
.new(base = Base, &block) ⇒ Object
Create a new Mobb application; the block is evaluated in the class scope.
531 532 533 534 535 |
# File 'lib/mobb/base.rb', line 531 def self.new(base = Base, &block) base = Class.new(base) base.class_eval(&block) if block_given? base end |