Class: RSpec::Core::Formatters::DeprecationFormatter::ImmediatePrinter
- Inherits:
-
Object
- Object
- RSpec::Core::Formatters::DeprecationFormatter::ImmediatePrinter
- Defined in:
- lib/rspec/core/formatters/deprecation_formatter.rb
Instance Attribute Summary (collapse)
-
- (Object) deprecation_formatter
readonly
Returns the value of attribute deprecation_formatter.
-
- (Object) deprecation_stream
readonly
Returns the value of attribute deprecation_stream.
-
- (Object) summary_stream
readonly
Returns the value of attribute summary_stream.
Instance Method Summary (collapse)
- - (Object) deprecation_summary
-
- (ImmediatePrinter) initialize(deprecation_stream, summary_stream, deprecation_formatter)
constructor
A new instance of ImmediatePrinter.
- - (Object) print_deprecation_message(data)
Constructor Details
- (ImmediatePrinter) initialize(deprecation_stream, summary_stream, deprecation_formatter)
A new instance of ImmediatePrinter
115 116 117 118 119 120 |
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 115 def initialize(deprecation_stream, summary_stream, deprecation_formatter) @deprecation_stream = deprecation_stream @summary_stream = summary_stream @deprecation_formatter = deprecation_formatter end |
Instance Attribute Details
- (Object) deprecation_formatter (readonly)
Returns the value of attribute deprecation_formatter
113 114 115 |
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 113 def deprecation_formatter @deprecation_formatter end |
- (Object) deprecation_stream (readonly)
Returns the value of attribute deprecation_stream
113 114 115 |
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 113 def deprecation_stream @deprecation_stream end |
- (Object) summary_stream (readonly)
Returns the value of attribute summary_stream
113 114 115 |
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 113 def summary_stream @summary_stream end |
Instance Method Details
- (Object) deprecation_summary
127 128 129 130 |
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 127 def deprecation_summary return if deprecation_formatter.count.zero? deprecation_stream.summarize(summary_stream, deprecation_formatter.count) end |
- (Object) print_deprecation_message(data)
122 123 124 125 |
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 122 def (data) = deprecation_formatter.(data) deprecation_stream.puts .to_s end |