Class: DiffParser::Commit
- Inherits:
-
Object
- Object
- DiffParser::Commit
- Defined in:
- lib/diff_parser/commit.rb
Instance Attribute Summary collapse
-
#github ⇒ Object
readonly
Returns the value of attribute github.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
-
#sha ⇒ Object
readonly
Returns the value of attribute sha.
Instance Method Summary collapse
- #diff(options = {}) ⇒ Object
-
#initialize(github, repo, sha) ⇒ Commit
constructor
A new instance of Commit.
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
#github ⇒ Object (readonly)
Returns the value of attribute github.
6 7 8 |
# File 'lib/diff_parser/commit.rb', line 6 def github @github end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
6 7 8 |
# File 'lib/diff_parser/commit.rb', line 6 def repo @repo end |
#sha ⇒ Object (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( = {}) DiffParser::Diff.new(self, ) end |