class VCLog::ChangePoint
The Change
class models an entry in a change log.
Attributes
change[R]
Change
from which point is derived.
color[RW]
ANSI color to apply. Actually this can be a list of any support ansi gem terms, but usually it’s just the color term, such as ‘:red`.
label[RW]
The descriptive label of this change, as assigned by hueristics.
level[RW]
The priority level of this change, as assigned by hueristics. This can be ‘nil`, as Heuristics
will always make sure a commit has an inteer level before going out to template.
message[RW]
The point’s message.
msg[RW]
The point’s message.
msg=[RW]
The point’s message.
type[RW]
Type of change, as assigned by hueristics.
Public Class Methods
new(change, message)
click to toggle source
# File lib/vclog/change_point.rb, line 24 def initialize(change, message) @change = change @message = message.strip @label = nil @level = nil end
Public Instance Methods
apply_heuristics(heuristics)
click to toggle source
Apply heuristic rules to change.
# File lib/vclog/change_point.rb, line 56 def apply_heuristics(heuristics) heuristics.apply(self) end
method_missing(s,*a,&b)
click to toggle source
Delegate missing methods to change
.
Calls superclass method
# File lib/vclog/change_point.rb, line 41 def method_missing(s,*a,&b) if @change.respond_to?(s) @change.send(s,*a,&b) else p caller super(s,*a,&b) end end
points()
click to toggle source
Change
points do not have sub-points.
# File lib/vclog/change_point.rb, line 51 def points [] end
to_h()
click to toggle source
# File lib/vclog/change_point.rb, line 61 def to_h { 'author' => change.author, 'date' => change.date, 'id' => change.id, 'message' => message, 'type' => type } end
to_s(*)
click to toggle source
# File lib/vclog/change_point.rb, line 71 def to_s(*) message end