module GitPlus::Refinements::Strings

Provides commit specific string enhancements.

Public Instance Methods

amend?(= match?(/\Aamend!\s/)) click to toggle source
# File lib/git_plus/refinements/strings.rb, line 14
        def amend? = match?(/\Aamend!\s/)

        def fixup? = match?(/\Afixup!\s/)

        def squash? = match?(/\Asquash!\s/)

        def prefix? = amend? || fixup? || squash?
      end
    end
  end
end
fixup?(= match?(/\Afixup!\s/)) click to toggle source
# File lib/git_plus/refinements/strings.rb, line 16
      def fixup? = match?(/\Afixup!\s/)

      def squash? = match?(/\Asquash!\s/)

      def prefix? = amend? || fixup? || squash?
    end
  end
end
pluralize(count:, suffix: "s") click to toggle source
# File lib/git_plus/refinements/strings.rb, line 8
def pluralize count:, suffix: "s"
  return "#{count} #{self}" if count == 1

  "#{count} #{self}#{suffix}"
end
prefix?(= amend? || fixup? || squash?) click to toggle source
# File lib/git_plus/refinements/strings.rb, line 20
  def prefix? = amend? || fixup? || squash?
end
squash?(= match?(/\Asquash!\s/)) click to toggle source
# File lib/git_plus/refinements/strings.rb, line 18
    def squash? = match?(/\Asquash!\s/)

    def prefix? = amend? || fixup? || squash?
  end
end