asciinema.org/app/models/brush.rb

32 lines
342 B
Ruby
Raw Normal View History

2013-07-10 06:45:17 +00:00
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
2013-07-10 06:45:17 +00:00
end