Class: NilClass
- Inherits:
-
Object
- Object
- NilClass
- 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
- #clean ⇒ Object
- #gsub ⇒ Object
- #postcodeize ⇒ Object
- #squash ⇒ Object
- #strip ⇒ Object
- #surnameize ⇒ Object
- #titleize ⇒ Object
- #to_date ⇒ Object
- #upcase ⇒ Object
Instance Method Details
#clean ⇒ Object
23 24 25 |
# File 'lib/ndr_support/nil.rb', line 23 def clean(*) nil end |
#gsub ⇒ Object
31 32 33 |
# File 'lib/ndr_support/nil.rb', line 31 def gsub(*) '' end |
#postcodeize ⇒ Object
15 16 17 |
# File 'lib/ndr_support/nil.rb', line 15 def postcodeize(*) nil end |
#squash ⇒ Object
27 28 29 |
# File 'lib/ndr_support/nil.rb', line 27 def squash nil end |
#strip ⇒ Object
35 36 37 |
# File 'lib/ndr_support/nil.rb', line 35 def strip nil end |
#surnameize ⇒ Object
11 12 13 |
# File 'lib/ndr_support/nil.rb', line 11 def surnameize nil end |
#titleize ⇒ Object
7 8 9 |
# File 'lib/ndr_support/nil.rb', line 7 def titleize nil end |
#to_date ⇒ Object
3 4 5 |
# File 'lib/ndr_support/nil.rb', line 3 def to_date nil end |
#upcase ⇒ Object
19 20 21 |
# File 'lib/ndr_support/nil.rb', line 19 def upcase nil end |