Class: FitCommit::ValidatorLoader
- Inherits:
-
Object
- Object
- FitCommit::ValidatorLoader
- Defined in:
- lib/fit_commit/validator_loader.rb
Instance Attribute Summary collapse
-
#branch_name ⇒ Object
Returns the value of attribute branch_name.
-
#configuration ⇒ Object
Returns the value of attribute configuration.
Instance Method Summary collapse
-
#initialize(branch_name, configuration = load_configuration) ⇒ ValidatorLoader
constructor
A new instance of ValidatorLoader.
- #validators ⇒ Object
Constructor Details
#initialize(branch_name, configuration = load_configuration) ⇒ ValidatorLoader
Returns a new instance of ValidatorLoader.
6 7 8 9 |
# File 'lib/fit_commit/validator_loader.rb', line 6 def initialize(branch_name, configuration = load_configuration) self.branch_name = branch_name self.configuration = configuration end |
Instance Attribute Details
#branch_name ⇒ Object
Returns the value of attribute branch_name.
5 6 7 |
# File 'lib/fit_commit/validator_loader.rb', line 5 def branch_name @branch_name end |
#configuration ⇒ Object
Returns the value of attribute configuration.
5 6 7 |
# File 'lib/fit_commit/validator_loader.rb', line 5 def configuration @configuration end |
Instance Method Details
#validators ⇒ Object
11 12 13 |
# File 'lib/fit_commit/validator_loader.rb', line 11 def validators all_validators.select(&:enabled?) end |