Sha256: 8f2fec6069efd700713c4a99556d467a5e24534d8991dc322edcefe82011e358

Contents?: true

Size: 372 Bytes

Versions: 7

Compression:

Stored size: 372 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

7 entries across 7 versions & 1 rubygems

Version Path
danger-wcc-0.1.4 lib/wcc/commit_lint/subject_cap_check.rb
danger-wcc-0.1.3 lib/wcc/commit_lint/subject_cap_check.rb
danger-wcc-0.1.2 lib/wcc/commit_lint/subject_cap_check.rb
danger-wcc-0.1.1 lib/wcc/commit_lint/subject_cap_check.rb
danger-wcc-0.1.0 lib/wcc/commit_lint/subject_cap_check.rb
danger-wcc-0.0.6 lib/wcc/commit_lint/subject_cap_check.rb
danger-wcc-0.0.5 lib/wcc/commit_lint/subject_cap_check.rb