Class: Gitmine::Commit
- Inherits:
-
Object
- Object
- Gitmine::Commit
- Defined in:
- lib/gitmine/commit.rb
Instance Attribute Summary collapse
-
#grit_commit ⇒ Object
readonly
Returns the value of attribute grit_commit.
Instance Method Summary collapse
-
#id ⇒ Object
Delegate #id to Grit::Commit.
-
#initialize(grit_commit) ⇒ Commit
constructor
Initialize a new Commit objects that delegates methods to the Grit::Commit object passed in.
-
#issue ⇒ Object
Issue associated with this commit Return nil if their is no associated issue.
Constructor Details
#initialize(grit_commit) ⇒ Commit
Initialize a new Commit objects that delegates methods to the Grit::Commit object passed in
5 6 7 |
# File 'lib/gitmine/commit.rb', line 5 def initialize(grit_commit) @grit_commit = grit_commit end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object (protected)
Delegate methods to Grit::Commit
22 23 24 25 |
# File 'lib/gitmine/commit.rb', line 22 def method_missing(m, *args, &block) return @grit_commit.send(m, args, block) if @grit_commit.respond_to? m super end |
Instance Attribute Details
#grit_commit ⇒ Object (readonly)
Returns the value of attribute grit_commit.
2 3 4 |
# File 'lib/gitmine/commit.rb', line 2 def grit_commit @grit_commit end |
Instance Method Details
#id ⇒ Object
Delegate #id to Grit::Commit
16 17 18 |
# File 'lib/gitmine/commit.rb', line 16 def id @grit_commit.id end |
#issue ⇒ Object
Issue associated with this commit Return nil if their is no associated issue
11 12 13 |
# File 'lib/gitmine/commit.rb', line 11 def issue @issue ||= Gitmine::Issue.get_for_commit() end |