Class: GitXplorer::GitObject::Revision
- Inherits:
-
GitXplorer::GitObject
- Object
- GitXplorer::GitObject
- GitXplorer::GitObject::Revision
- Defined in:
- lib/git_xplorer/git_object/revision.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Attributes inherited from GitXplorer::GitObject
Instance Method Summary collapse
- #desc ⇒ Object
-
#initialize(revision, parent, summary, date, user) ⇒ Revision
constructor
A new instance of Revision.
- #tab_complete(color = false) ⇒ Object
Methods inherited from GitXplorer::GitObject
#absolute_path, #children, #exist?, #get, #get_completions, #has_child?, #to_s
Constructor Details
#initialize(revision, parent, summary, date, user) ⇒ Revision
Returns a new instance of Revision.
10 11 12 13 14 15 |
# File 'lib/git_xplorer/git_object/revision.rb', line 10 def initialize(revision, parent, summary, date, user) super(revision, parent) @date = date @summary = summary @user = user end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
2 3 4 |
# File 'lib/git_xplorer/git_object/revision.rb', line 2 def date @date end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
3 4 5 |
# File 'lib/git_xplorer/git_object/revision.rb', line 3 def summary @summary end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
4 5 6 |
# File 'lib/git_xplorer/git_object/revision.rb', line 4 def user @user end |
Instance Method Details
#desc ⇒ Object
6 7 8 |
# File 'lib/git_xplorer/git_object/revision.rb', line 6 def desc return "#{@date} #{@user} #{@summary}" end |
#tab_complete(color = false) ⇒ Object
17 18 19 20 |
# File 'lib/git_xplorer/git_object/revision.rb', line 17 def tab_complete(color = false) color ||= false return {@name => @date} end |