Class: Reedb::Timestamp

Inherits:
Object
  • Object
show all
Defined in:
lib/reedb/utils/utilities.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTimestamp

Returns a new instance of Timestamp.



19
20
21
# File 'lib/reedb/utils/utilities.rb', line 19

def initialize
  @utc = Time.now.getutc
end

Instance Attribute Details

#utcObject

Returns the value of attribute utc.



17
18
19
# File 'lib/reedb/utils/utilities.rb', line 17

def utc
  @utc
end

Instance Method Details

#<(x) ⇒ Object



23
24
25
# File 'lib/reedb/utils/utilities.rb', line 23

def < x
  return (self.utc < x.utc)
end

#==(x) ⇒ Object



31
32
33
# File 'lib/reedb/utils/utilities.rb', line 31

def == x
  return (self.utc == x.utc)
end

#>(x) ⇒ Object



27
28
29
# File 'lib/reedb/utils/utilities.rb', line 27

def > x
  return (self.utc > x.utc)
end

#to_sObject



35
36
37
# File 'lib/reedb/utils/utilities.rb', line 35

def to_s
  return "#{@utc}"
end