Class: Date

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.old_parseObject



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

alias_method :old_parse, :parse

.parse(*args, &block) ⇒ Object



322
323
324
325
# File 'lib/kiss/model.rb', line 322

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

Instance Method Details

#<(value) ⇒ Object



338
339
340
# File 'lib/kiss/model.rb', line 338

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

#<=(value) ⇒ Object



341
342
343
# File 'lib/kiss/model.rb', line 341

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

#==(value) ⇒ Object

comparision operators



329
330
331
# File 'lib/kiss/model.rb', line 329

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

#>(value) ⇒ Object



332
333
334
# File 'lib/kiss/model.rb', line 332

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

#>=(value) ⇒ Object



335
336
337
# File 'lib/kiss/model.rb', line 335

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