Class: Poper2::Rule::Capitalization
- Inherits:
-
Rule
- Object
- Rule
- Poper2::Rule::Capitalization
show all
- Defined in:
- lib/poper2/rule/capitalization.rb
Instance Method Summary
collapse
Methods inherited from Rule
all, inherited, #initialize
Instance Method Details
#check(message) ⇒ Object
4
5
6
|
# File 'lib/poper2/rule/capitalization.rb', line 4
def check(message)
error_message unless message[0] == message[0].capitalize
end
|
#enabled? ⇒ Boolean
8
9
10
|
# File 'lib/poper2/rule/capitalization.rb', line 8
def enabled?
@config.enforce_capitalized_enabled.to_s == 'true'
end
|