class Rubbis::Transaction
Public Class Methods
new()
click to toggle source
# File lib/rubbis/transaction.rb, line 3 def initialize @active = false @buffer = [] @dirty = false end
Public Instance Methods
active?()
click to toggle source
# File lib/rubbis/transaction.rb, line 13 def active? @active end
buffer()
click to toggle source
# File lib/rubbis/transaction.rb, line 30 def buffer @buffer end
dirty!()
click to toggle source
# File lib/rubbis/transaction.rb, line 17 def dirty! @dirty = true end
dirty?()
click to toggle source
# File lib/rubbis/transaction.rb, line 21 def dirty? @dirty end
queue(cmd)
click to toggle source
# File lib/rubbis/transaction.rb, line 25 def queue(cmd) raise unless @active @buffer << cmd end
start!()
click to toggle source
# File lib/rubbis/transaction.rb, line 9 def start! @active = true end