Class: Blastr::SourceControl::LogEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/scm/scm.rb

Direct Known Subclasses

GitLogEntry

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(revision, author, comment) ⇒ LogEntry

Returns a new instance of LogEntry.



7
8
9
10
11
# File 'lib/scm/scm.rb', line 7

def initialize(revision, author, comment)
  @revision = revision
  @author = author
  @comment = comment
end

Instance Attribute Details

#authorObject

Returns the value of attribute author.



5
6
7
# File 'lib/scm/scm.rb', line 5

def author
  @author
end

#commentObject

Returns the value of attribute comment.



5
6
7
# File 'lib/scm/scm.rb', line 5

def comment
  @comment
end

#revisionObject

Returns the value of attribute revision.



5
6
7
# File 'lib/scm/scm.rb', line 5

def revision
  @revision
end

Instance Method Details

#==(other) ⇒ Object



13
14
15
# File 'lib/scm/scm.rb', line 13

def ==(other)
  @revision == other.revision and @author == other.author and @comment == other.comment
end

#to_sObject



17
18
19
# File 'lib/scm/scm.rb', line 17

def to_s
  "revision #{@revision} by #{@author}: #{@comment}"
end