Class: DiffParser::Commit

Inherits:
Object
  • Object
show all
Defined in:
lib/diff_parser/commit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(github, repo, sha) ⇒ Commit

Returns a new instance of Commit.



8
9
10
11
12
# File 'lib/diff_parser/commit.rb', line 8

def initialize(github, repo, sha)
  @github = github
  @repo = repo
  @sha = sha
end

Instance Attribute Details

#githubObject (readonly)

Returns the value of attribute github.



6
7
8
# File 'lib/diff_parser/commit.rb', line 6

def github
  @github
end

#repoObject (readonly)

Returns the value of attribute repo.



6
7
8
# File 'lib/diff_parser/commit.rb', line 6

def repo
  @repo
end

#shaObject (readonly)

Returns the value of attribute sha.



6
7
8
# File 'lib/diff_parser/commit.rb', line 6

def sha
  @sha
end

Instance Method Details

#diff(options = {}) ⇒ Object



14
15
16
# File 'lib/diff_parser/commit.rb', line 14

def diff(options = {})
  DiffParser::Diff.new(self, options)
end