Class: Soca::Plugin

Inherits:
Object
  • 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, options = {}) ⇒ Plugin

Returns a new instance of Plugin.



15
16
17
18
# File 'lib/soca/plugin.rb', line 15

def initialize(pusher, options = {})
  @pusher = pusher
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/soca/plugin.rb', line 4

def options
  @options
end

#pusherObject (readonly)

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



6
7
8
9
# File 'lib/soca/plugin.rb', line 6

def self.name(plugin_name)
  @@plugins ||= {}
  @@plugins[plugin_name] = self
end

.pluginsObject



11
12
13
# File 'lib/soca/plugin.rb', line 11

def self.plugins
  @@plugins ||= {}
end

Instance Method Details

#app_dirObject



24
25
26
# File 'lib/soca/plugin.rb', line 24

def app_dir
  pusher.app_dir
end

#configObject



28
29
30
# File 'lib/soca/plugin.rb', line 28

def config
  pusher.config
end

#loggerObject



20
21
22
# File 'lib/soca/plugin.rb', line 20

def logger
  Soca.logger
end