class SCV::Objects::Commit
Public Class Methods
new(date:, **kwargs)
click to toggle source
Calls superclass method
# File lib/scv/objects/commit.rb, line 8 def initialize(date:, **kwargs) # Parse the date on deserialization date = DateTime.parse date if date.is_a? String super end
Public Instance Methods
hash_objects()
click to toggle source
# File lib/scv/objects/commit.rb, line 15 def hash_objects [@message, @tree, parents_for_hash, @author, @date.to_s] end
Private Instance Methods
parents_for_hash()
click to toggle source
# File lib/scv/objects/commit.rb, line 21 def parents_for_hash if parents.empty? nil elsif parents.size == 1 parents.first else parents end end