Sha256: 07681e073d358aeacf365589eb04ccecbdc94b9a2aaba564a9ffd7bf63cd5139

Contents?: true

Size: 289 Bytes

Versions: 15

Compression:

Stored size: 289 Bytes

Contents

require 'ludy/class/undef_all_methods'
require 'singleton'

module Ludy
  # a blackhole would eat any message it received.
  class Blackhole
    undef_all_methods
    include Singleton
    def method_missing msg, *args, &block
      self
    end
    def nil?
      true
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
godfat-ludy-0.1.13 lib/ludy/blackhole.rb
ludy-0.1.15 lib/ludy/blackhole.rb
ludy-0.1.1 lib/ludy/blackhole.rb
ludy-0.1.11 lib/ludy/blackhole.rb
ludy-0.1.13 lib/ludy/blackhole.rb
ludy-0.1.10 lib/ludy/blackhole.rb
ludy-0.1.2 lib/ludy/blackhole.rb
ludy-0.1.0 lib/ludy/blackhole.rb
ludy-0.1.3 lib/ludy/blackhole.rb
ludy-0.1.4 lib/ludy/blackhole.rb
ludy-0.1.5 lib/ludy/blackhole.rb
ludy-0.1.6 lib/ludy/blackhole.rb
ludy-0.1.7 lib/ludy/blackhole.rb
ludy-0.1.9 lib/ludy/blackhole.rb
ludy-0.1.8 lib/ludy/blackhole.rb