Class: Tatami::Flot

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Flot

Returns a new instance of Flot.



5
6
7
# File 'lib/tatami/flot.rb', line 5

def initialize *args
  @couch = Couch.new *args
end

Instance Attribute Details

#couchObject (readonly)

Returns the value of attribute couch.



4
5
6
# File 'lib/tatami/flot.rb', line 4

def couch
  @couch
end

Instance Method Details

#blank!Object



14
15
16
17
# File 'lib/tatami/flot.rb', line 14

def blank!
  couch.blank!
  couch.design_load
end

#record_node_prop(typ, hash, time = Time.now) ⇒ Object



9
10
11
12
# File 'lib/tatami/flot.rb', line 9

def record_node_prop typ, hash, time = Time.now
  time_i = (time.to_i + 7200)*1000
  couch.doc_new nil, hash.merge(time: time_i,typ: typ)
end