Class: DamageControl::Publisher::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/damagecontrol/publisher/base.rb

Overview

Base class for publishers. Subclasses must extend this class and call register self.

Constant Summary collapse

@@classes =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



10
11
12
# File 'lib/damagecontrol/publisher/base.rb', line 10

def enabled
  @enabled
end

Class Method Details

.classesObject



16
17
18
# File 'lib/damagecontrol/publisher/base.rb', line 16

def self.classes
  @@classes
end

.register(cls) ⇒ Object



13
14
15
# File 'lib/damagecontrol/publisher/base.rb', line 13

def self.register(cls) 
  @@classes << cls unless @@classes.index(cls)
end