Class: Gitt::Models::Commit
- Inherits:
-
Struct
- Object
- Struct
- Gitt::Models::Commit
- Defined in:
- lib/gitt/models/commit.rb
Overview
Represents commit details.
Instance Attribute Summary collapse
-
#author_email ⇒ Object
Returns the value of attribute author_email.
-
#author_name ⇒ Object
Returns the value of attribute author_name.
-
#authored_at ⇒ Object
Returns the value of attribute authored_at.
-
#authored_relative_at ⇒ Object
Returns the value of attribute authored_relative_at.
-
#body ⇒ Object
Returns the value of attribute body.
-
#body_lines ⇒ Object
Returns the value of attribute body_lines.
-
#body_paragraphs ⇒ Object
Returns the value of attribute body_paragraphs.
-
#committed_at ⇒ Object
Returns the value of attribute committed_at.
-
#committed_relative_at ⇒ Object
Returns the value of attribute committed_relative_at.
-
#committer_email ⇒ Object
Returns the value of attribute committer_email.
-
#committer_name ⇒ Object
Returns the value of attribute committer_name.
-
#lines ⇒ Object
Returns the value of attribute lines.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#sha ⇒ Object
Returns the value of attribute sha.
-
#signature ⇒ Object
Returns the value of attribute signature.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#trailers ⇒ Object
Returns the value of attribute trailers.
Instance Method Summary collapse
- #amend? ⇒ Boolean
- #fixup? ⇒ Boolean
-
#initialize ⇒ Commit
constructor
A new instance of Commit.
- #prefix? ⇒ Boolean
- #squash? ⇒ Boolean
Constructor Details
#initialize ⇒ Commit
Returns a new instance of Commit.
25 26 27 28 |
# File 'lib/gitt/models/commit.rb', line 25 def initialize(**) super freeze end |
Instance Attribute Details
#author_email ⇒ Object
Returns the value of attribute author_email
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def @author_email end |
#author_name ⇒ Object
Returns the value of attribute author_name
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def @author_name end |
#authored_at ⇒ Object
Returns the value of attribute authored_at
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def @authored_at end |
#authored_relative_at ⇒ Object
Returns the value of attribute authored_relative_at
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def @authored_relative_at end |
#body ⇒ Object
Returns the value of attribute body
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def body @body end |
#body_lines ⇒ Object
Returns the value of attribute body_lines
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def body_lines @body_lines end |
#body_paragraphs ⇒ Object
Returns the value of attribute body_paragraphs
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def body_paragraphs @body_paragraphs end |
#committed_at ⇒ Object
Returns the value of attribute committed_at
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def committed_at @committed_at end |
#committed_relative_at ⇒ Object
Returns the value of attribute committed_relative_at
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def committed_relative_at @committed_relative_at end |
#committer_email ⇒ Object
Returns the value of attribute committer_email
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def committer_email @committer_email end |
#committer_name ⇒ Object
Returns the value of attribute committer_name
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def committer_name @committer_name end |
#lines ⇒ Object
Returns the value of attribute lines
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def lines @lines end |
#raw ⇒ Object
Returns the value of attribute raw
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def raw @raw end |
#sha ⇒ Object
Returns the value of attribute sha
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def sha @sha end |
#signature ⇒ Object
Returns the value of attribute signature
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def signature @signature end |
#subject ⇒ Object
Returns the value of attribute subject
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def subject @subject end |
#trailers ⇒ Object
Returns the value of attribute trailers
6 7 8 |
# File 'lib/gitt/models/commit.rb', line 6 def trailers @trailers end |
Instance Method Details
#amend? ⇒ Boolean
30 |
# File 'lib/gitt/models/commit.rb', line 30 def amend? = subject.match?(/\Aamend!\s/) |
#fixup? ⇒ Boolean
32 |
# File 'lib/gitt/models/commit.rb', line 32 def fixup? = subject.match?(/\Afixup!\s/) |
#prefix? ⇒ Boolean
36 |
# File 'lib/gitt/models/commit.rb', line 36 def prefix? = amend? || fixup? || squash? |
#squash? ⇒ Boolean
34 |
# File 'lib/gitt/models/commit.rb', line 34 def squash? = subject.match?(/\Asquash!\s/) |