Sha256: d2f153e272ec62f18005c776c63880ef2686c227dd1617b76baa08a0754cd79b

Contents?: true

Size: 373 Bytes

Versions: 3

Compression:

Stored size: 373 Bytes

Contents

# frozen_string_literal: true

class SubjectCapCheck < CommitCheck
  MESSAGE = 'Please start subject with capital letter.'

  def self.type
    :subject_cap
  end

  def initialize(message, _options = {})
    @first_character = message[:subject].split('').first
  end

  def message
    MESSAGE
  end

  def fail?
    @first_character != @first_character.upcase
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
danger-wcc-0.0.4 lib/wcc/commit_lint/subject_cap_check.rb
danger-wcc-0.0.3 lib/wcc/commit_lint/subject_cap_check.rb
danger-wcc-0.0.2 lib/wcc/commit_lint/subject_cap_check.rb