Class: Gollum::Git::Commit
- Inherits:
-
Object
- Object
- Gollum::Git::Commit
- Defined in:
- lib/rugged_adapter/git_layer_rugged.rb
Instance Attribute Summary collapse
-
#commit ⇒ Object
readonly
Returns the value of attribute commit.
Instance Method Summary collapse
- #author ⇒ Object
- #authored_date ⇒ Object
- #id ⇒ Object (also: #sha, #to_s)
-
#initialize(commit) ⇒ Commit
constructor
A new instance of Commit.
- #message ⇒ Object
- #stats ⇒ Object
- #tree ⇒ Object
Constructor Details
#initialize(commit) ⇒ Commit
Returns a new instance of Commit.
96 97 98 |
# File 'lib/rugged_adapter/git_layer_rugged.rb', line 96 def initialize(commit) @commit = commit end |
Instance Attribute Details
#commit ⇒ Object (readonly)
Returns the value of attribute commit.
106 107 108 |
# File 'lib/rugged_adapter/git_layer_rugged.rb', line 106 def commit @commit end |
Instance Method Details
#author ⇒ Object
108 109 110 |
# File 'lib/rugged_adapter/git_layer_rugged.rb', line 108 def @author ||= Gollum::Git::Actor.new(@commit.[:name], @commit.[:email]) end |
#authored_date ⇒ Object
112 113 114 |
# File 'lib/rugged_adapter/git_layer_rugged.rb', line 112 def @commit.[:time] end |
#id ⇒ Object Also known as: sha, to_s
100 101 102 |
# File 'lib/rugged_adapter/git_layer_rugged.rb', line 100 def id @commit.oid end |
#message ⇒ Object
116 117 118 |
# File 'lib/rugged_adapter/git_layer_rugged.rb', line 116 def @commit. end |
#stats ⇒ Object
124 125 126 |
# File 'lib/rugged_adapter/git_layer_rugged.rb', line 124 def stats @stats ||= build_stats end |