Class: Reviewer::Loader
- Inherits:
-
Object
- Object
- Reviewer::Loader
- Defined in:
- lib/reviewer/loader.rb
Overview
Provides a collection of the configured tools
Defined Under Namespace
Classes: InvalidConfigurationError, MissingConfigurationError, MissingReviewCommandError
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file = Reviewer.configuration.file) ⇒ Loader
constructor
A new instance of Loader.
- #to_h ⇒ Object
Constructor Details
#initialize(file = Reviewer.configuration.file) ⇒ Loader
Returns a new instance of Loader.
16 17 18 19 20 21 |
# File 'lib/reviewer/loader.rb', line 16 def initialize(file = Reviewer.configuration.file) @file = file @configuration = configuration_hash validate_configuration! end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
14 15 16 |
# File 'lib/reviewer/loader.rb', line 14 def configuration @configuration end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
14 15 16 |
# File 'lib/reviewer/loader.rb', line 14 def file @file end |
Class Method Details
.configuration ⇒ Object
27 28 29 |
# File 'lib/reviewer/loader.rb', line 27 def self.configuration new.configuration end |
Instance Method Details
#to_h ⇒ Object
23 24 25 |
# File 'lib/reviewer/loader.rb', line 23 def to_h configuration end |