Class: Spec::HashWithDeprecationNotice

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

Instance Method Summary collapse

Constructor Details

#initialize(method, alternate_method = nil, &block) ⇒ HashWithDeprecationNotice

Returns a new instance of HashWithDeprecationNotice.



31
32
33
# File 'lib/spec/deprecation.rb', line 31

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

Instance Method Details

#[]=(k, v) ⇒ Object



34
35
36
37
# File 'lib/spec/deprecation.rb', line 34

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