Class: GithubApi::Commit

Inherits:
Object
  • Object
show all
Defined in:
lib/github-api/other.rb

Overview

Commit class


Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject

Returns the value of attribute data.



39
40
41
# File 'lib/github-api/other.rb', line 39

def data
  @data
end

#repoObject

Returns the value of attribute repo.



39
40
41
# File 'lib/github-api/other.rb', line 39

def repo
  @repo
end

Instance Method Details

#treeObject



46
47
48
# File 'lib/github-api/other.rb', line 46

def tree
  @repo.tree(data["tree"]["sha"])
end