Class: Danger::DangerCommitLint::SubjectCapCheck
- Inherits:
-
CommitCheck
- Object
- CommitCheck
- Danger::DangerCommitLint::SubjectCapCheck
- Defined in:
- lib/commit_lint/subject_cap_check.rb
Overview
:nodoc:
Constant Summary collapse
- MESSAGE =
'Please start subject with capital letter.'.freeze
Class Method Summary collapse
Instance Method Summary collapse
- #fail? ⇒ Boolean
-
#initialize(message) ⇒ SubjectCapCheck
constructor
A new instance of SubjectCapCheck.
Methods inherited from CommitCheck
Constructor Details
#initialize(message) ⇒ SubjectCapCheck
Returns a new instance of SubjectCapCheck.
10 11 12 |
# File 'lib/commit_lint/subject_cap_check.rb', line 10 def initialize() @first_character = [:subject].split('').first end |
Class Method Details
.type ⇒ Object
6 7 8 |
# File 'lib/commit_lint/subject_cap_check.rb', line 6 def self.type :subject_cap end |
Instance Method Details
#fail? ⇒ Boolean
14 15 16 |
# File 'lib/commit_lint/subject_cap_check.rb', line 14 def fail? @first_character != @first_character.upcase end |