Class Aquarium::Utils::NilObject
In: lib/aquarium/utils/nil_object.rb
Parent: Object

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.

Methods

Public Instance methods

[Source]

    # File lib/aquarium/utils/nil_object.rb, line 9
 9:       def eql? other
10:         other.kind_of? NilObject
11:       end

[Source]

    # File lib/aquarium/utils/nil_object.rb, line 13
13:       def method_missing method_sym, *args
14:         self
15:       end

[Validate]