Class: Whoosh::Plugins::Base
- Inherits:
-
Object
- Object
- Whoosh::Plugins::Base
- Defined in:
- lib/whoosh/plugins/base.rb
Class Method Summary collapse
- .accessor_name(name = nil) ⇒ Object
- .after_response(res, config) ⇒ Object
- .before_request(req, config) ⇒ Object
- .gem_name(name = nil) ⇒ Object
- .initialize_plugin(config) ⇒ Object
- .middleware? ⇒ Boolean
Class Method Details
.accessor_name(name = nil) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/whoosh/plugins/base.rb', line 15 def accessor_name(name = nil) if name @accessor_name = name else @accessor_name end end |
.after_response(res, config) ⇒ Object
31 32 33 |
# File 'lib/whoosh/plugins/base.rb', line 31 def after_response(res, config) # Override in subclass end |
.before_request(req, config) ⇒ Object
27 28 29 |
# File 'lib/whoosh/plugins/base.rb', line 27 def before_request(req, config) # Override in subclass end |
.gem_name(name = nil) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/whoosh/plugins/base.rb', line 7 def gem_name(name = nil) if name @gem_name = name else @gem_name end end |
.initialize_plugin(config) ⇒ Object
35 36 37 38 |
# File 'lib/whoosh/plugins/base.rb', line 35 def initialize_plugin(config) # Override in subclass — return the plugin instance nil end |
.middleware? ⇒ Boolean
23 24 25 |
# File 'lib/whoosh/plugins/base.rb', line 23 def middleware? false end |