Sha256: 60c481bbf697c857d564c3f3c4e2d06c66c3c9ace47ebc653d435c77fa8739de

Contents?: true

Size: 323 Bytes

Versions: 3

Compression:

Stored size: 323 Bytes

Contents

# frozen_string_literal: true

class SubjectWordsCheck < CommitCheck
  MESSAGE = 'Please use more than one word.'

  def self.type
    :subject_words
  end

  def initialize(message, _options = {})
    @subject = message[:subject]
  end

  def message
    MESSAGE
  end

  def fail?
    @subject.split.count < 2
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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