Class: Commit
- Inherits:
-
Object
- Object
- Commit
- Defined in:
- lib/worth/commit.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#changes ⇒ Object
readonly
Returns the value of attribute changes.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(author, message, changes) ⇒ Commit
constructor
A new instance of Commit.
- #to_csv ⇒ Object
Constructor Details
#initialize(author, message, changes) ⇒ Commit
Returns a new instance of Commit.
9 10 11 12 13 |
# File 'lib/worth/commit.rb', line 9 def initialize(, , changes) @author = @message = @changes = changes end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
7 8 9 |
# File 'lib/worth/commit.rb', line 7 def @author end |
#changes ⇒ Object (readonly)
Returns the value of attribute changes.
7 8 9 |
# File 'lib/worth/commit.rb', line 7 def changes @changes end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/worth/commit.rb', line 7 def @message end |
Class Method Details
.heading ⇒ Object
3 4 5 |
# File 'lib/worth/commit.rb', line 3 def self.heading "author,message,weight" end |
Instance Method Details
#to_csv ⇒ Object
15 16 17 |
# File 'lib/worth/commit.rb', line 15 def to_csv "#{},#{},#{weight}" if relevant? end |