class RR::NoisyCursor
Wraps an existing cursor. Purpose: send regular updates to the installed TaskSweeper
Attributes
org_cursor[RW]
The original cusor
sweeper[RW]
The installed task sweeper
Public Class Methods
new(cursor, sweeper)
click to toggle source
Create a new NoisyCursor.
-
cursor: the original cursor
-
sweeper: the target TaskSweeper
# File lib/rubyrep/noisy_connection.rb, line 15 def initialize(cursor, sweeper) self.org_cursor = cursor self.sweeper = sweeper end
Public Instance Methods
clear()
click to toggle source
# File lib/rubyrep/noisy_connection.rb, line 22 def clear; org_cursor.clear end
next?()
click to toggle source
Delegate the uninteresting methods to the original cursor
# File lib/rubyrep/noisy_connection.rb, line 21 def next?; org_cursor.next? end
next_row()
click to toggle source
Returns the row as a column => value hash and moves the cursor to the next row.
# File lib/rubyrep/noisy_connection.rb, line 25 def next_row sweeper.ping row = org_cursor.next_row sweeper.ping row end