123456789_123456789_123456789_123456789_123456789_

Class: RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: rspec-core/lib/rspec/core/formatters/deprecation_formatter.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#type (rw)

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/formatters/deprecation_formatter.rb', line 66

SpecifiedDeprecationMessage = Struct.new(:type)

Instance Method Details

#deprecation_type_for(data) (private)

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/formatters/deprecation_formatter.rb', line 88

def deprecation_type_for(data)
  data.message.gsub(/(\w+\/)+\w+\.rb:\d+/, '')
end

#output_formatted(str) (private)

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/formatters/deprecation_formatter.rb', line 82

def output_formatted(str)
  return str unless str.lines.count > 1
  separator = '-' * 80
  "#{separator}\n#{str.chomp}\n#{separator}"
end

#to_s

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/formatters/deprecation_formatter.rb', line 72

def to_s
  output_formatted @message
end

#too_many_warnings_message

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/formatters/deprecation_formatter.rb', line 76

def too_many_warnings_message
  TOO_MANY_WARNINGS_NOTICE
end