Class/Module Index [+]

Quicksearch

RSpec::Core::Deprecation

Public Instance Methods

deprecate(deprecated, replacement_or_hash={}, ignore_version=nil) click to toggle source

@private

Used internally to print deprecation warnings

# File lib/rspec/core/deprecation.rb, line 7
def deprecate(deprecated, replacement_or_hash={}, ignore_version=nil)
  # Temporarily support old and new APIs while we transition the other
  # rspec libs to use a hash for the 2nd arg and no version arg
  data = Hash === replacement_or_hash ? replacement_or_hash : { :replacement => replacement_or_hash }
  RSpec.configuration.reporter.deprecation(
    {
      :deprecated => deprecated,
      :call_site => caller(0)[2]
    }.merge(data)
  )
end
warn_deprecation(message) click to toggle source

@private

Used internally to print deprecation warnings

# File lib/rspec/core/deprecation.rb, line 22
def warn_deprecation(message)
  RSpec.configuration.reporter.deprecation :message => message
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.