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.
32 lines
342 B
Ruby
32 lines
342 B
Ruby
class Brush
|
|
|
|
def initialize(attributes = {})
|
|
@attributes = attributes
|
|
end
|
|
|
|
def fg
|
|
attributes[:fg]
|
|
end
|
|
|
|
def bg
|
|
attributes[:bg]
|
|
end
|
|
|
|
def bold?
|
|
!!attributes[:bold]
|
|
end
|
|
|
|
def underline?
|
|
!!attributes[:underline]
|
|
end
|
|
|
|
def inverse?
|
|
!!attributes[:inverse]
|
|
end
|
|
|
|
private
|
|
|
|
attr_reader :attributes
|
|
|
|
end
|