Class: Queris::Query::Trace::TraceBase
- Inherits:
-
Object
- Object
- Queris::Query::Trace::TraceBase
- Defined in:
- lib/queris/query/trace.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#fval(val) ⇒ Object
future value.
- #indent(n = nil) ⇒ Object
- #indentation ⇒ Object
- #set_options(opt = {}) ⇒ Object
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 |
#indentation ⇒ Object
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 (opt={}) @opt=opt end |