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
8 |
# File 'lib/gitt/directable.rb', line 8 def amend? = subject.match?(/\Aamend!\s/) |
#directive? ⇒ Boolean
6 |
# File 'lib/gitt/directable.rb', line 6 def directive? = amend? || fixup? || squash? |
#fixup? ⇒ Boolean
10 |
# File 'lib/gitt/directable.rb', line 10 def fixup? = subject.match?(/\Afixup!\s/) |
#prefix ⇒ Object
14 |
# File 'lib/gitt/directable.rb', line 14 def prefix = subject[/\A[\w\!]+/] |
#squash? ⇒ Boolean
12 |
# File 'lib/gitt/directable.rb', line 12 def squash? = subject.match?(/\Asquash!\s/) |