Sha256: 6526423673e11191afbba38c99d750d78ed27260c4a3cf35dac4f8ebe81cdb9a
Contents?: true
Size: 488 Bytes
Versions: 6
Compression:
Stored size: 488 Bytes
Contents
module Aquarium module Utils # 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. class Aquarium::Utils::NilObject def eql? other other.kind_of? NilObject end def method_missing method_sym, *args self end end end end
Version data entries
6 entries across 6 versions & 1 rubygems