Class: LogStash::Timestamp

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/logstash/timestamp.rb

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object

TODO (colin) implement in Java



15
16
17
# File 'lib/logstash/timestamp.rb', line 15

def +(other)
  self.time + other
end

#-(value) ⇒ Object

TODO (colin) implement in Java



20
21
22
# File 'lib/logstash/timestamp.rb', line 20

def -(value)
  self.time - (value.is_a?(Timestamp) ? value.time : value)
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/logstash/timestamp.rb', line 10

def eql?(other)
  self.== other
end