Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_ext/core/time.rb

Instance Method Summary collapse

Instance Method Details

#==(o) ⇒ Object



7
8
9
10
# File 'lib/ruby_ext/core/time.rb', line 7

def == o
  return true if equal?(o)
  o.respond_to?(:to_i) and to_i == o.to_i
end

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


2
3
4
5
# File 'lib/ruby_ext/core/time.rb', line 2

def eql? o
  return true if equal?(o)
  self.class == o and self == o
end