class Cue::Indicator
Attributes
state[R]
Public Class Methods
new(state)
click to toggle source
# File lib/cue/indicator.rb, line 9 def initialize(state) @state = state end
Public Instance Methods
color()
click to toggle source
# File lib/cue/indicator.rb, line 13 def color case state when :complete :green when :incomplete :red else :none end end
symbol()
click to toggle source
# File lib/cue/indicator.rb, line 24 def symbol case state when :complete '✓' when :incomplete '✗' else '?' end end
to_s()
click to toggle source
# File lib/cue/indicator.rb, line 35 def to_s colorize(color) { symbol } end