Module: C3s

Defined in:
lib/c3s.rb,
lib/component.rb,
lib/c3s_logger.rb,
lib/pubsub/node.rb,
lib/republisher.rb,
lib/configreader.rb,
lib/databaseadapter.rb,
lib/pubsub/publisher.rb,
lib/pubsub/subscriber.rb,
lib/pubsub/nodetracker.rb,
lib/component_connection.rb

Defined Under Namespace

Classes: C3sLogger, Component, ComponentConnection, ConfigReader, DatabaseAdapter, Node, NodeTracker, Publisher, Republisher, Subscriber

Constant Summary collapse

VERSION =
"0.3.3"
SECTIONS =

The configuration sections on a standard component yml file

['client', 'server', 'db']

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



32
33
34
# File 'lib/c3s.rb', line 32

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#ensure_unique(name) ⇒ Object



36
37
38
39
40
# File 'lib/c3s.rb', line 36

def ensure_unique(name)
  begin
    self[name] = yield
  end while self.class.exists?(name => self[name])
end