Class: AnsiArt::Converter
- Inherits:
-
Object
- Object
- AnsiArt::Converter
show all
- Defined in:
- lib/ansi_art/converter.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Converter.
3
4
5
|
# File 'lib/ansi_art/converter.rb', line 3
def initialize
reset_color
end
|
Instance Method Details
#commit_color ⇒ Object
18
19
20
|
# File 'lib/ansi_art/converter.rb', line 18
def commit_color
end
|
#output ⇒ Object
this is when new color is ACKed, do nothing by default
21
22
|
# File 'lib/ansi_art/converter.rb', line 21
def output
end
|
#reset_color ⇒ Object
15
16
17
|
# File 'lib/ansi_art/converter.rb', line 15
def reset_color
set_color 7,0,false
end
|
#set_color(fg, bg, bri) ⇒ Object
9
10
11
|
# File 'lib/ansi_art/converter.rb', line 9
def set_color fg,bg,bri
@color = {:fg => fg, :bg => bg, :bri => bri}
end
|
#set_color_for(key, color) ⇒ Object
12
13
14
|
# File 'lib/ansi_art/converter.rb', line 12
def set_color_for key,color
@color[key] = color
end
|
#wait_half_char! ⇒ Object
store dual color char left side color
6
7
8
|
# File 'lib/ansi_art/converter.rb', line 6
def wait_half_char! @leftColor = @color.clone
end
|