class GitReporting::Commit

Attributes

author[RW]
message[RW]
sha[RW]
time[RW]
timestamp[RW]

Public Class Methods

new(attrs = {}) click to toggle source
# File lib/git_reporting/commit.rb, line 8
def initialize(attrs = {})
  @time = 0
  attrs.each do |key, value|
    send "#{key}=", value
  end
end

Public Instance Methods

message=(value) click to toggle source
# File lib/git_reporting/commit.rb, line 15
def message=(value)
  parsed = MessageParser.parse(value)
  @message = parsed.first
  @time = parsed.last if parsed.last.present?
end
to_s() click to toggle source
# File lib/git_reporting/commit.rb, line 21
def to_s
  "Commit #{sha}"
end