module Danger::Changelog::Config

Constants

ACCESSORS
ATTRIBUTES
DELEGATORS

Public Instance Methods

format=(value) click to toggle source
# File lib/changelog/config.rb, line 32
def format=(value)
  raise ArgumentError, "Invalid format: #{value}" unless Danger::Changelog::Parsers.valid?(value)

  @format = value
end
ignore_files=(value) click to toggle source
# File lib/changelog/config.rb, line 42
def ignore_files=(value)
  @ignore_files = Array(value)
end
parser() click to toggle source
# File lib/changelog/config.rb, line 46
def parser
  Danger::Changelog::Parsers.lookup(format)
end
placeholder_line=(value) click to toggle source
# File lib/changelog/config.rb, line 21
def placeholder_line=(value)
  if value
    new_value = value
    new_value = "* #{new_value}" unless new_value.start_with?('* ')
    new_value = "#{new_value}\n" unless new_value.end_with?("\n")
    @placeholder_line = new_value
  else
    @placeholder_line = nil
  end
end
placeholder_line?() click to toggle source
# File lib/changelog/config.rb, line 38
def placeholder_line?
  !@placeholder_line.nil?
end
reset() click to toggle source
# File lib/changelog/config.rb, line 50
def reset
  self.placeholder_line = "* Your contribution here.\n"
  self.filename = 'CHANGELOG.md'
  self.format = Danger::Changelog::Parsers.default_format
  self.ignore_files = ['README.md']
end