Class: GithubApi::Commit
- Inherits:
-
Object
- Object
- GithubApi::Commit
- Defined in:
- lib/github-api/other.rb
Overview
Commit class
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#repo ⇒ Object
Returns the value of attribute repo.
Instance Method Summary collapse
-
#initialize(repo, data) ⇒ Commit
constructor
A new instance of Commit.
- #tree ⇒ Object
Constructor Details
#initialize(repo, data) ⇒ Commit
Returns a new instance of Commit.
41 42 43 44 |
# File 'lib/github-api/other.rb', line 41 def initialize(repo, data) @repo = repo @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
39 40 41 |
# File 'lib/github-api/other.rb', line 39 def data @data end |
#repo ⇒ Object
Returns the value of attribute repo.
39 40 41 |
# File 'lib/github-api/other.rb', line 39 def repo @repo end |
Instance Method Details
#tree ⇒ Object
46 47 48 |
# File 'lib/github-api/other.rb', line 46 def tree @repo.tree(data["tree"]["sha"]) end |