Module: Gitt::Directable

Included in:
Models::Commit
Defined in:
lib/gitt/directable.rb

Overview

Provides shared behavior for objects that can act like a commit.

Instance Method Summary collapse

Instance Method Details

#amend?Boolean

Returns:

  • (Boolean)


8
# File 'lib/gitt/directable.rb', line 8

def amend? = subject.match?(/\Aamend!\s/)

#directive?Boolean

Returns:

  • (Boolean)


6
# File 'lib/gitt/directable.rb', line 6

def directive? = amend? || fixup? || squash?

#fixup?Boolean

Returns:

  • (Boolean)


10
# File 'lib/gitt/directable.rb', line 10

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

#prefixObject



14
# File 'lib/gitt/directable.rb', line 14

def prefix = subject[/\A[\w\!]+/]

#squash?Boolean

Returns:

  • (Boolean)


12
# File 'lib/gitt/directable.rb', line 12

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