Class: Poper::Rule::SummaryCharacterLimit

Inherits:
Rule
  • Object
show all
Defined in:
lib/poper/rule/summary_character_limit.rb

Instance Method Summary collapse

Methods inherited from Rule

all, inherited, #initialize

Constructor Details

This class inherits a constructor from Poper::Rule::Rule

Instance Method Details

#check(message) ⇒ Object



4
5
6
# File 'lib/poper/rule/summary_character_limit.rb', line 4

def check(message)
  error_message if message.lines.first.chomp.length > character_limit
end

#enabled?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/poper/rule/summary_character_limit.rb', line 8

def enabled?
  @config.summary_character_limit_enabled.to_s == 'true'
end