Class: RSpec::HashWithDeprecationNotice

Inherits:
Hash
  • Object
show all
Defined in:
lib/rspec/core/deprecation.rb

Instance Method Summary collapse

Constructor Details

#initialize(method, alternate_method = nil) ⇒ HashWithDeprecationNotice

Returns a new instance of HashWithDeprecationNotice.



40
41
42
# File 'lib/rspec/core/deprecation.rb', line 40

def initialize(method, alternate_method=nil)
  @method, @alternate_method = method, alternate_method
end

Instance Method Details

#[]=(k, v) ⇒ Object



44
45
46
47
# File 'lib/rspec/core/deprecation.rb', line 44

def []=(k,v)
  RSpec.deprecate(@method, @alternate_method)
  super(k,v)
end