lib/ruco/style_map.rb in ruco-0.2.0.beta vs lib/ruco/style_map.rb in ruco-0.2.0.beta2
- old
+ new
@@ -1,8 +1,8 @@
module Ruco
class StyleMap
- attr_accessor :lines, :foreground, :background
+ attr_accessor :lines
def initialize(lines)
@lines = Array.new(lines)
end
@@ -18,10 +18,10 @@
def flatten
@lines.map do |styles|
next unless styles
- # change to style at start and recalculate one after the end
+ # change to style at start and revert to normal one after the end
points_of_change = styles.map{|s,c| [c.first, c.last_element+1] }.flatten.uniq
flat = []
points_of_change.each do |point|