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.



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

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

Instance Method Details

#[]=(k, v) ⇒ Object



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

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