Class: GitHack::Commit
- Inherits:
-
Object
- Object
- GitHack::Commit
- Defined in:
- lib/git-hack/commit.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#committer ⇒ Object
Returns the value of attribute committer.
-
#message ⇒ Object
Returns the value of attribute message.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#sha ⇒ Object
Returns the value of attribute sha.
-
#tree ⇒ Object
Returns the value of attribute tree.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Commit
constructor
A new instance of Commit.
Constructor Details
#initialize(hash) ⇒ Commit
Returns a new instance of Commit.
8 9 10 11 12 13 14 15 |
# File 'lib/git-hack/commit.rb', line 8 def initialize(hash) @sha = hash['sha'] @message = hash['message'] @parent = hash['parent'] @tree = hash['tree'] @author = hash['author'] @committer = hash['committer'] end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
7 8 9 |
# File 'lib/git-hack/commit.rb', line 7 def @author end |
#committer ⇒ Object
Returns the value of attribute committer.
7 8 9 |
# File 'lib/git-hack/commit.rb', line 7 def committer @committer end |
#message ⇒ Object
Returns the value of attribute message.
7 8 9 |
# File 'lib/git-hack/commit.rb', line 7 def @message end |
#parent ⇒ Object
Returns the value of attribute parent.
7 8 9 |
# File 'lib/git-hack/commit.rb', line 7 def parent @parent end |
#sha ⇒ Object
Returns the value of attribute sha.
7 8 9 |
# File 'lib/git-hack/commit.rb', line 7 def sha @sha end |
#tree ⇒ Object
Returns the value of attribute tree.
7 8 9 |
# File 'lib/git-hack/commit.rb', line 7 def tree @tree end |