Class: CheckAhead::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/check-ahead/configuration.rb

Constant Summary collapse

DEFAULT_ATTRS =
{
  base_tags: %w[revert merge],
  contributing_md: File.join(Dir.pwd, 'CONTRIBUTING.md'),
  commit_range: 'HEAD~1..HEAD',
  max_length: 50,
  check_max_length: false,
  check_commit_message: true
}.freeze
ATTRS =
DEFAULT_ATTRS.keys

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
22
# File 'lib/check-ahead/configuration.rb', line 18

def initialize
  DEFAULT_ATTRS.each do |attribute, value|
    send("#{attribute}=", ENV[attribute.to_s.upcase] || value)
  end
end