Class: CouchReplica::Replicator

Inherits:
Object
  • Object
show all
Defined in:
lib/couch_replica/replicator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_endpoint:, target_endpoint:, prefix_filter: nil) ⇒ Replicator

Returns a new instance of Replicator.



9
10
11
12
13
# File 'lib/couch_replica/replicator.rb', line 9

def initialize(source_endpoint:, target_endpoint:, prefix_filter: nil)
  @source_endpoint = source_endpoint
  @target_endpoint = target_endpoint
  @prefix_filter = prefix_filter
end

Instance Attribute Details

#prefix_filterObject (readonly)

Returns the value of attribute prefix_filter.



7
8
9
# File 'lib/couch_replica/replicator.rb', line 7

def prefix_filter
  @prefix_filter
end

#source_endpointObject (readonly)

Returns the value of attribute source_endpoint.



7
8
9
# File 'lib/couch_replica/replicator.rb', line 7

def source_endpoint
  @source_endpoint
end

#target_endpointObject (readonly)

Returns the value of attribute target_endpoint.



7
8
9
# File 'lib/couch_replica/replicator.rb', line 7

def target_endpoint
  @target_endpoint
end

Instance Method Details

#startObject



15
16
17
# File 'lib/couch_replica/replicator.rb', line 15

def start
  databases.map(&:start)
end

#stopObject



19
20
21
# File 'lib/couch_replica/replicator.rb', line 19

def stop
  databases.map(&:stop)
end