Class: Queris::Query::Trace::TraceBase

Inherits:
Object
  • Object
show all
Defined in:
lib/queris/query/trace.rb

Direct Known Subclasses

TraceMessage, TraceOp

Instance Method Summary collapse

Instance Method Details

#fval(val) ⇒ Object

future value



17
18
19
20
21
22
23
# File 'lib/queris/query/trace.rb', line 17

def fval(val) #future value
  begin
    Redis::Future === val ? val.value : val
  rescue Redis::FutureNotReady => e
    "unavailable"
  end
end

#indent(n = nil) ⇒ Object



7
8
9
10
# File 'lib/queris/query/trace.rb', line 7

def indent(n=nil)
  @indent=n if n
  "  " * indentation
end

#indentationObject



11
12
13
# File 'lib/queris/query/trace.rb', line 11

def indentation
  @indent || 0
end

#set_options(opt = {}) ⇒ Object



14
15
16
# File 'lib/queris/query/trace.rb', line 14

def set_options(opt={})
  @opt=opt
end