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.
19 20 21 |
# File 'lib/reedb/utils/utilities.rb', line 19 def initialize @utc = Time.now.getutc end |
Instance Attribute Details
#utc ⇒ Object
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_s ⇒ Object
35 36 37 |
# File 'lib/reedb/utils/utilities.rb', line 35 def to_s return "#{@utc}" end |