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.



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

def initialize 
	@utc = Time.now.getutc
end

Instance Attribute Details

#utcObject

Returns the value of attribute utc.



15
16
17
# File 'lib/reedb/utils/utilities.rb', line 15

def utc
  @utc
end

Instance Method Details

#<(x) ⇒ Object



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

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

#==(x) ⇒ Object



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

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

#>(x) ⇒ Object



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

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

#to_sObject



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

def to_s
	return "#{@utc}"
end