Sha256: 48bea78a97eedb10d08a5f367b0ff2f4dbc5892d9fb6f9c0335762fa5b9bead9

Contents?: true

Size: 422 Bytes

Versions: 6

Compression:

Stored size: 422 Bytes

Contents

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

    instance_methods.each do |m|
      undef_method m unless m =~ /^(__|object_id)/
    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

6 entries across 6 versions & 3 rubygems

Version Path
JackDanger-inherited_resources-0.9.1 lib/inherited_resources/dumb_responder.rb
inherited_resources-0.9.5 lib/inherited_resources/dumb_responder.rb
inherited_resources-0.9.4 lib/inherited_resources/dumb_responder.rb
inherited_resources-0.9.3 lib/inherited_resources/dumb_responder.rb
inherited_resources-0.9.2 lib/inherited_resources/dumb_responder.rb
base_rails_app-0.0.1 lib/vendor/plugins/inherited_resources/lib/inherited_resources/dumb_responder.rb