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.3.0 lib/inherited_resources/blank_slate.rb
karsthammer-inherited_resources-1.2.2.1 lib/inherited_resources/blank_slate.rb
karsthammer-inherited_resources-1.2.2 lib/inherited_resources/blank_slate.rb
inherited_resources-1.2.2 lib/inherited_resources/blank_slate.rb
karsthammer-inherited_resources-1.2.1.1 lib/inherited_resources/blank_slate.rb
karsthammer-inherited_resources-1.2.1 lib/inherited_resources/blank_slate.rb
inherited_resources-1.2.1 lib/inherited_resources/blank_slate.rb
inherited_resources-1.2.0 lib/inherited_resources/blank_slate.rb
karsthammer-inherited_resources-1.1.2.1 lib/inherited_resources/blank_slate.rb
karsthammer-inherited_resources-1.1.2 lib/inherited_resources/blank_slate.rb
extended_inherited_resources-0.2.1 lib/inherited_resources/blank_slate.rb
extended_inherited_resources-0.2.0 lib/inherited_resources/blank_slate.rb
extended_inherited_resources-0.1.0 lib/inherited_resources/blank_slate.rb
inherited_resources-1.1.2 lib/inherited_resources/blank_slate.rb
inherited_resources-1.0.6 lib/inherited_resources/blank_slate.rb
inherited_resources-1.0.5 lib/inherited_resources/blank_slate.rb
inherited_resources-1.0.4 lib/inherited_resources/blank_slate.rb
inherited_resources-1.1.0 lib/inherited_resources/blank_slate.rb
inherited_resources-1.0.3 lib/inherited_resources/blank_slate.rb
inherited_resources-1.1.pre lib/inherited_resources/blank_slate.rb