Class: CouchBum::BingeContext

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

Overview

Context under which the callback passed to binge_changes is executed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(changes) ⇒ BingeContext

Returns a new instance of BingeContext.



54
55
56
# File 'lib/couch_bum/couch_bum.rb', line 54

def initialize(changes)
  @changes = changes
end

Instance Attribute Details

#current_seqObject

Returns the value of attribute current_seq.



52
53
54
# File 'lib/couch_bum/couch_bum.rb', line 52

def current_seq
  @current_seq
end

Instance Method Details

#chokeObject



58
59
60
# File 'lib/couch_bum/couch_bum.rb', line 58

def choke
  throw :choke
end

#last_seqObject



62
63
64
# File 'lib/couch_bum/couch_bum.rb', line 62

def last_seq
  @changes['last_seq']
end

#pendingObject



66
67
68
# File 'lib/couch_bum/couch_bum.rb', line 66

def pending
  @changes['pending']
end