Class: GitStats::GitData::ShortStat
- Inherits:
-
Object
- Object
- GitStats::GitData::ShortStat
- Defined in:
- lib/git_stats/git_data/short_stat.rb
Instance Attribute Summary collapse
-
#commit ⇒ Object
readonly
Returns the value of attribute commit.
-
#deletions ⇒ Object
readonly
Returns the value of attribute deletions.
-
#files_changed ⇒ Object
readonly
Returns the value of attribute files_changed.
-
#insertions ⇒ Object
readonly
Returns the value of attribute insertions.
Instance Method Summary collapse
- #changed_lines ⇒ Object
-
#initialize(commit) ⇒ ShortStat
constructor
A new instance of ShortStat.
Constructor Details
#initialize(commit) ⇒ ShortStat
Returns a new instance of ShortStat.
8 9 10 11 |
# File 'lib/git_stats/git_data/short_stat.rb', line 8 def initialize(commit) @commit = commit calculate_stat end |
Instance Attribute Details
#commit ⇒ Object (readonly)
Returns the value of attribute commit.
6 7 8 |
# File 'lib/git_stats/git_data/short_stat.rb', line 6 def commit @commit end |
#deletions ⇒ Object (readonly)
Returns the value of attribute deletions.
6 7 8 |
# File 'lib/git_stats/git_data/short_stat.rb', line 6 def deletions @deletions end |
#files_changed ⇒ Object (readonly)
Returns the value of attribute files_changed.
6 7 8 |
# File 'lib/git_stats/git_data/short_stat.rb', line 6 def files_changed @files_changed end |
#insertions ⇒ Object (readonly)
Returns the value of attribute insertions.
6 7 8 |
# File 'lib/git_stats/git_data/short_stat.rb', line 6 def insertions @insertions end |
Instance Method Details
#changed_lines ⇒ Object
13 14 15 |
# File 'lib/git_stats/git_data/short_stat.rb', line 13 def changed_lines insertions + deletions end |