lib/remedy/partial.rb in remedy-0.3.1 vs lib/remedy/partial.rb in remedy-0.4.0

- old
+ new

@@ -14,29 +14,31 @@ def << line reset_width! line = "#{line}" # opportunistically convert any object into a string @lines += clean line unless line.nil? || line.empty? + self end def first lines.first end def last lines.last end - def length + def height lines.length end + alias_method :length, :height def width - @width ||= lines.max{|line| line.length }.length + lines.map{|line| line.length }.max end def size - Size.new length, width + Size.new height, width end def to_a lines end