class Aquarium::Utils::Aquarium::Utils::Aquarium::Utils::NilObject
An implementation of the Null Object
Pattern (renamed “Nil” for Ruby). All methods not defined by Object
simply return the Aquarium::Utils::NilObject itself. Users can subclass or add methods to instances to customize the behavior.
Public Instance Methods
eql?(other)
click to toggle source
# File lib/aquarium/utils/nil_object.rb 9 def eql? other 10 other.kind_of? NilObject 11 end
method_missing(method_sym, *args)
click to toggle source
# File lib/aquarium/utils/nil_object.rb 13 def method_missing method_sym, *args 14 self 15 end