asciinema.org/app/models/cell.rb
2013-09-10 21:29:17 +02:00

23 lines
292 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 as_json(*)
[text, brush.as_json]
end
end