Sha256: 3513a021ec9382143829de21d6ef05e49299118e51478c37efc602525360cf78

Contents?: true

Size: 322 Bytes

Versions: 7

Compression:

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

7 entries across 7 versions & 1 rubygems

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