You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
308 B
Ruby
23 lines
308 B
Ruby
11 years ago
|
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
|