Class: Whoosh::Plugins::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/whoosh/plugins/base.rb

Class Method Summary collapse

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

Returns:

  • (Boolean)


23
24
25
# File 'lib/whoosh/plugins/base.rb', line 23

def middleware?
  false
end