Class: PreCommit::Checks::Plugin::ConfigFile
- Inherits:
-
Object
- Object
- PreCommit::Checks::Plugin::ConfigFile
- Defined in:
- lib/pre-commit/checks/plugin/config_file.rb
Instance Method Summary collapse
-
#initialize(name, config, alternate_location) ⇒ ConfigFile
constructor
A new instance of ConfigFile.
- #location ⇒ Object
Constructor Details
#initialize(name, config, alternate_location) ⇒ ConfigFile
Returns a new instance of ConfigFile.
5 6 7 8 9 |
# File 'lib/pre-commit/checks/plugin/config_file.rb', line 5 def initialize(name, config, alternate_location) @name = name @config = config @alternate_location = alternate_location end |
Instance Method Details
#location ⇒ Object
11 12 13 14 15 |
# File 'lib/pre-commit/checks/plugin/config_file.rb', line 11 def location return @location if defined?(@location) @location = location_from_config || location_from_alternate end |