Class: GithubApi::Reference
- Inherits:
-
Object
- Object
- GithubApi::Reference
- Defined in:
- lib/github-api/other.rb
Overview
Reference 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
- #commit ⇒ Object
-
#initialize(repo, data) ⇒ Reference
constructor
A new instance of Reference.
Constructor Details
#initialize(repo, data) ⇒ Reference
Returns a new instance of Reference.
22 23 24 25 |
# File 'lib/github-api/other.rb', line 22 def initialize(repo, data) @repo = repo @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
20 21 22 |
# File 'lib/github-api/other.rb', line 20 def data @data end |
#repo ⇒ Object
Returns the value of attribute repo.
20 21 22 |
# File 'lib/github-api/other.rb', line 20 def repo @repo end |
Instance Method Details
#commit ⇒ Object
27 28 29 30 |
# File 'lib/github-api/other.rb', line 27 def commit # TODO: Object in ref is not always a commit. @repo.commit(data["object"]["sha"]) end |