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.



34
35
36
# File 'lib/rspec/core/deprecation.rb', line 34

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

Instance Method Details

#[]=(k, v) ⇒ Object



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

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