asciinema.org/app/models/cell.rb
2013-08-25 20:49:23 +02:00

23 lines
308 B
Ruby

class Cell
attr_reader :text, :brush
def initialize(text, brush)
@text = text
@brush = brush
end
def empty?
text.blank? && brush.default?
end
def ==(other)
text == other.text && brush == other.brush
end
def css_class
BrushPresenter.new(brush).to_css_class
end
end