Class: Reedb::Timestamp
- Inherits:
-
Object
- Object
- Reedb::Timestamp
- Defined in:
- lib/reedb/utils/utilities.rb
Instance Attribute Summary collapse
-
#utc ⇒ Object
Returns the value of attribute utc.
Instance Method Summary collapse
- #<(x) ⇒ Object
- #==(x) ⇒ Object
- #>(x) ⇒ Object
-
#initialize ⇒ Timestamp
constructor
A new instance of Timestamp.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Timestamp
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
#utc ⇒ Object
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_s ⇒ Object
32 33 34 |
# File 'lib/reedb/utils/utilities.rb', line 32 def to_s return "#{@utc}" end |