Sha256: 1b2c1c35ad8b4d411aa482aec3588d931a0b126bf4277c768da5b33cbb357d83

Contents?: true

Size: 267 Bytes

Versions: 44

Compression:

Stored size: 267 Bytes

Contents

module InheritedResources
  # An object from BlankSlate simply discards all messages sent to it.
  class BlankSlate
    instance_methods.each do |m|
      undef_method m unless m =~ /^(__|object_id)/
    end

    def method_missing(*args)
      nil
    end
  end
end

Version data entries

44 entries across 44 versions & 4 rubygems

Version Path
inherited_resources-1.0.2 lib/inherited_resources/blank_slate.rb
inherited_resources-1.0.1 lib/inherited_resources/blank_slate.rb
inherited_resources-1.0.0 lib/inherited_resources/blank_slate.rb
inherited_resources-1.0.pre lib/inherited_resources/blank_slate.rb