Class: Obst::GitLog::Commit
- Inherits:
-
Object
- Object
- Obst::GitLog::Commit
- Defined in:
- lib/obst/git_log.rb
Defined Under Namespace
Classes: FileStatus
Constant Summary collapse
- SPACE =
"\s"
Instance Attribute Summary collapse
-
#committed_at ⇒ Object
readonly
Returns the value of attribute committed_at.
-
#file_statuses ⇒ Object
readonly
Returns the value of attribute file_statuses.
Instance Method Summary collapse
-
#initialize(lines) ⇒ Commit
constructor
A new instance of Commit.
Constructor Details
#initialize(lines) ⇒ Commit
Returns a new instance of Commit.
22 23 24 25 |
# File 'lib/obst/git_log.rb', line 22 def initialize(lines) @committed_at = lines.shift @file_statuses = lines.map{ |l| FileStatus.new(l) } end |
Instance Attribute Details
#committed_at ⇒ Object (readonly)
Returns the value of attribute committed_at.
20 21 22 |
# File 'lib/obst/git_log.rb', line 20 def committed_at @committed_at end |
#file_statuses ⇒ Object (readonly)
Returns the value of attribute file_statuses.
20 21 22 |
# File 'lib/obst/git_log.rb', line 20 def file_statuses @file_statuses end |