Class: RSpec::Core::Formatters::Loader Private
- Inherits:
-
Object
- Object
- RSpec::Core::Formatters::Loader
- Defined in:
- lib/rspec/core/formatters.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
RSpec::Core::Formatters::Loader
is an internal class for
managing formatters used by a particular configuration. It is
not expected to be used directly, but only through the configuration
interface.
Instance Attribute Summary collapse
-
#default_formatter ⇒ String
private
The default formatter to setup, defaults to
progress
. -
#formatters ⇒ Array
readonly
private
The loaded formatters.
-
#reporter ⇒ Reporter
readonly
private
The reporter.
Class Method Summary collapse
-
.formatters ⇒ void
private
Internal formatters are stored here when loaded.
Instance Method Summary collapse
-
#initialize(reporter) ⇒ Loader
constructor
private
A new instance of Loader.
Constructor Details
#initialize(reporter) ⇒ Loader
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Loader.
105 106 107 108 109 |
# File 'lib/rspec/core/formatters.rb', line 105 def initialize(reporter) @formatters = [] @reporter = reporter self.default_formatter = 'progress' end |
Instance Attribute Details
#default_formatter ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the default formatter to setup, defaults to progress
.
118 119 120 |
# File 'lib/rspec/core/formatters.rb', line 118 def default_formatter @default_formatter end |
#formatters ⇒ Array (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the loaded formatters.
112 113 114 |
# File 'lib/rspec/core/formatters.rb', line 112 def formatters @formatters end |
#reporter ⇒ Reporter (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the reporter.
115 116 117 |
# File 'lib/rspec/core/formatters.rb', line 115 def reporter @reporter end |
Class Method Details
.formatters ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Internal formatters are stored here when loaded.
100 101 102 |
# File 'lib/rspec/core/formatters.rb', line 100 def self.formatters @formatters ||= {} end |