Class: Soca::Plugin
- Inherits:
-
Object
show all
- Defined in:
- lib/soca/plugin.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(pusher) ⇒ Plugin
Returns a new instance of Plugin.
14
15
16
|
# File 'lib/soca/plugin.rb', line 14
def initialize(pusher)
@pusher = pusher
end
|
Instance Attribute Details
#pusher ⇒ Object
Returns the value of attribute pusher.
3
4
5
|
# File 'lib/soca/plugin.rb', line 3
def pusher
@pusher
end
|
Class Method Details
.name(plugin_name) ⇒ Object
5
6
7
8
|
# File 'lib/soca/plugin.rb', line 5
def self.name(plugin_name)
@@plugins ||= {}
@@plugins[plugin_name] = self
end
|
.plugins ⇒ Object
10
11
12
|
# File 'lib/soca/plugin.rb', line 10
def self.plugins
@@plugins ||= {}
end
|
Instance Method Details
#app_dir ⇒ Object
26
27
28
|
# File 'lib/soca/plugin.rb', line 26
def app_dir
pusher.app_dir
end
|
#logger ⇒ Object
22
23
24
|
# File 'lib/soca/plugin.rb', line 22
def logger
Soca.logger
end
|
#run(options = {}) ⇒ Object
18
19
20
|
# File 'lib/soca/plugin.rb', line 18
def run(options = {})
raise "you need to subclass plugin and provide your own logic, please"
end
|