End of day commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
NullObject = Naught.build do |config|
|
||||
config.black_hole
|
||||
config.define_explicit_conversions
|
||||
config.define_implicit_conversions
|
||||
end
|
||||
|
||||
class NullObject
|
||||
def presence
|
||||
nil
|
||||
end
|
||||
def present?
|
||||
false
|
||||
end
|
||||
def blank?
|
||||
true
|
||||
end
|
||||
def empty?
|
||||
true
|
||||
end
|
||||
def any?
|
||||
false
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user