Module: CouchTap
- Extended by:
- CouchTap
- Included in:
- CouchTap
- Defined in:
- lib/couch_tap.rb,
lib/couch_tap/schema.rb,
lib/couch_tap/changes.rb,
lib/couch_tap/builders/table.rb,
lib/couch_tap/destroyers/table.rb,
lib/couch_tap/document_handler.rb,
lib/couch_tap/builders/collection.rb,
lib/couch_tap/destroyers/collection.rb
Defined Under Namespace
Modules: Builders, Destroyers
Classes: Changes, DocumentHandler, Schema
Instance Method Summary
collapse
Instance Method Details
#changes(database, &block) ⇒ Object
24
25
26
|
# File 'lib/couch_tap.rb', line 24
def changes(database, &block)
(@changes ||= []) << Changes.new(database, &block)
end
|
#logger ⇒ Object
Provide some way to handle messages
37
38
39
|
# File 'lib/couch_tap.rb', line 37
def logger
@logger ||= prepare_logger
end
|
#prepare_logger ⇒ Object
41
42
43
44
45
|
# File 'lib/couch_tap.rb', line 41
def prepare_logger
log = Logger.new(STDOUT)
log.level = Logger::INFO
log
end
|
#start ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/couch_tap.rb', line 28
def start
EventMachine.run do
@changes.each do |changes|
changes.start
end
end
end
|