lib/rscm/revision.rb in rscm-0.3.13 vs lib/rscm/revision.rb in rscm-0.3.14
- old
+ new
@@ -140,14 +140,15 @@
end
self.developer = file.developer if file.developer
self.message = file.message if file.message
end
- def [] (file)
- @files[file]
+ def [] (index)
+ @files[index]
end
+ # Iterates over all the RevisionFile objects
def each(&block)
@files.each(&block)
end
def pop
@@ -155,10 +156,11 @@
end
def length
@files.length
end
+ alias :size :length
def time=(t)
raise "time must be a Time object - it was a #{t.class.name} with the string value #{t}" unless t.is_a?(Time)
raise "can't set time to an inferiour value than the previous value" if @time && (t < @time)
@time = t
@@ -186,15 +188,9 @@
result = "#{identifier} | #{developer} | #{time} | #{message}\n"
self.each do |file|
result << " " << file.to_s << "\n"
end
result
- end
-
- # Returns the identifier of the revision. This is the revision
- # (if defined) or an UTC time if it is not natively supported by the scm.
- def identifierAA
- @identifier || @time
end
end
end