Class: FitCommit::ValidatorLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/fit_commit/validator_loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject

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

#configurationObject

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

#validatorsObject



11
12
13
# File 'lib/fit_commit/validator_loader.rb', line 11

def validators
  all_validators.select(&:enabled?)
end