Class: RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage
- Inherits:
-
Struct
- Object
- Struct
- RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage
- Defined in:
- lib/rspec/core/formatters/deprecation_formatter.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ SpecifiedDeprecationMessage
constructor
A new instance of SpecifiedDeprecationMessage.
- #to_s ⇒ Object
- #too_many_warnings_message ⇒ Object
Constructor Details
#initialize(data) ⇒ SpecifiedDeprecationMessage
Returns a new instance of SpecifiedDeprecationMessage.
64 65 66 67 |
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 64 def initialize(data) @message = data[:message] super deprecation_type_for(data) end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type
63 64 65 |
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 63 def type @type end |
Instance Method Details
#to_s ⇒ Object
69 70 71 |
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 69 def to_s output_formatted @message end |
#too_many_warnings_message ⇒ Object
73 74 75 76 77 |
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 73 def msg = "Too many similar deprecation messages reported, disregarding further reports. " msg << DEPRECATION_STREAM_NOTICE msg end |