Class: Time

Inherits:
Object show all
Defined in:
lib/kiss/model.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.old_parseObject



348
# File 'lib/kiss/model.rb', line 348

alias_method :old_parse, :parse

.parse(*args, &block) ⇒ Object



349
350
351
352
# File 'lib/kiss/model.rb', line 349

def parse(*args, &block)
  return SequelZeroTime.new(args[0]) if args[0] =~ /0000/
  old_parse(*args, &block)
end

Instance Method Details

#<(value) ⇒ Object



365
366
367
# File 'lib/kiss/model.rb', line 365

def <(value)
  (value == 0 || value.is_a?(SequelZeroTime)) ? false : super(value)
end

#<=(value) ⇒ Object



368
369
370
# File 'lib/kiss/model.rb', line 368

def <=(value)
  (value == 0 || value.is_a?(SequelZeroTime)) ? false : super(value)
end

#==(value) ⇒ Object

comparision operators



356
357
358
# File 'lib/kiss/model.rb', line 356

def ==(value)
  (value == 0 || value.is_a?(SequelZeroTime)) ? false : super(value)
end

#>(value) ⇒ Object



359
360
361
# File 'lib/kiss/model.rb', line 359

def >(value)
  (value == 0 || value.is_a?(SequelZeroTime)) ? true : super(value)
end

#>=(value) ⇒ Object



362
363
364
# File 'lib/kiss/model.rb', line 362

def >=(value)
  (value == 0 || value.is_a?(SequelZeroTime)) ? true : super(value)
end