Class: RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/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) ⇒ GeneratedDeprecationMessage
constructor
A new instance of GeneratedDeprecationMessage.
- #to_s ⇒ Object
- #too_many_warnings_message ⇒ Object
Methods inherited from Struct
Constructor Details
#initialize(data) ⇒ GeneratedDeprecationMessage
Returns a new instance of GeneratedDeprecationMessage.
95 96 97 98 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/deprecation_formatter.rb', line 95 def initialize(data) @data = data super data.deprecated end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type
94 95 96 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/deprecation_formatter.rb', line 94 def type @type end |
Instance Method Details
#to_s ⇒ Object
100 101 102 103 104 105 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/deprecation_formatter.rb', line 100 def to_s msg = String.new("#{@data.deprecated} is deprecated.") msg << " Use #{@data.replacement} instead." if @data.replacement msg << " Called from #{@data.call_site}." if @data.call_site msg end |
#too_many_warnings_message ⇒ Object
107 108 109 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/deprecation_formatter.rb', line 107 def "Too many uses of deprecated '#{type}'. #{DEPRECATION_STREAM_NOTICE}" end |