Class: Hubeye::Server::Commit
- Inherits:
-
Object
- Object
- Hubeye::Server::Commit
- Defined in:
- lib/hubeye/server/commit.rb
Overview
simple interface to Github’s api v3 for commits
Instance Attribute Summary collapse
-
#committer_name ⇒ Object
readonly
Returns the value of attribute committer_name.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#repo_name ⇒ Object
readonly
Returns the value of attribute repo_name.
-
#sha ⇒ Object
readonly
Returns the value of attribute sha.
Instance Method Summary collapse
-
#initialize(repo_name, raw_commit_ary) ⇒ Commit
constructor
A new instance of Commit.
Constructor Details
#initialize(repo_name, raw_commit_ary) ⇒ Commit
Returns a new instance of Commit.
8 9 10 11 12 13 14 |
# File 'lib/hubeye/server/commit.rb', line 8 def initialize(repo_name, raw_commit_ary) commit_hash = parse_raw_commit_ary(raw_commit_ary) @repo_name = repo_name @sha = commit_hash['sha'] @message = commit_hash['commit']['message'] @committer_name = commit_hash['commit']['committer']['name'] end |
Instance Attribute Details
#committer_name ⇒ Object (readonly)
Returns the value of attribute committer_name.
6 7 8 |
# File 'lib/hubeye/server/commit.rb', line 6 def committer_name @committer_name end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/hubeye/server/commit.rb', line 6 def @message end |
#repo_name ⇒ Object (readonly)
Returns the value of attribute repo_name.
6 7 8 |
# File 'lib/hubeye/server/commit.rb', line 6 def repo_name @repo_name end |
#sha ⇒ Object (readonly)
Returns the value of attribute sha.
6 7 8 |
# File 'lib/hubeye/server/commit.rb', line 6 def sha @sha end |