Class: NilClass

Inherits:
Object
  • Object
show all
Defined in:
lib/ndr_support/nil.rb

Overview

Extend Nilclass to avoid nil.xxx errors when empty data returned from database

Instance Method Summary collapse

Instance Method Details

#cleanObject



23
24
25
# File 'lib/ndr_support/nil.rb', line 23

def clean(*)
  nil
end

#gsubObject



31
32
33
# File 'lib/ndr_support/nil.rb', line 31

def gsub(*)
  ''
end

#postcodeizeObject



15
16
17
# File 'lib/ndr_support/nil.rb', line 15

def postcodeize(*)
  nil
end

#squashObject



27
28
29
# File 'lib/ndr_support/nil.rb', line 27

def squash
  nil
end

#stripObject



35
36
37
# File 'lib/ndr_support/nil.rb', line 35

def strip
  nil
end

#surnameizeObject



11
12
13
# File 'lib/ndr_support/nil.rb', line 11

def surnameize
  nil
end

#titleizeObject



7
8
9
# File 'lib/ndr_support/nil.rb', line 7

def titleize
  nil
end

#to_dateObject



3
4
5
# File 'lib/ndr_support/nil.rb', line 3

def to_date
  nil
end

#upcaseObject



19
20
21
# File 'lib/ndr_support/nil.rb', line 19

def upcase
  nil
end