Sha256: c7ff78e925fdbfb16fef33413c1328088a74c2e99db309c24ef621ddb61cdd64

Contents?: true

Size: 414 Bytes

Versions: 10

Compression:

Stored size: 414 Bytes

Contents

# = Dumb Responder
#
# This responder discards all messages sent to him.
#
module InheritedResources #:nodoc:
  class DumbResponder #:nodoc:

    instance_methods.each do |m|
      undef_method m unless m =~ /^__/
    end

    # This is like a good husband, he will just listen everything that his wife
    # says (which is a lot) without complaining. :)
    def method_missing(*args)
      nil
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
josevalim-inherited_resources-0.4.4 lib/inherited_resources/dumb_responder.rb
josevalim-inherited_resources-0.4.5 lib/inherited_resources/dumb_responder.rb
josevalim-inherited_resources-0.4.6 lib/inherited_resources/dumb_responder.rb
josevalim-inherited_resources-0.5.0 lib/inherited_resources/dumb_responder.rb
josevalim-inherited_resources-0.5.1 lib/inherited_resources/dumb_responder.rb
josevalim-inherited_resources-0.5.2 lib/inherited_resources/dumb_responder.rb
josevalim-inherited_resources-0.6.0 lib/inherited_resources/dumb_responder.rb
josevalim-inherited_resources-0.6.1 lib/inherited_resources/dumb_responder.rb
josevalim-inherited_resources-0.6.2 lib/inherited_resources/dumb_responder.rb
josevalim-inherited_resources-0.6.3 lib/inherited_resources/dumb_responder.rb