Class: Prissy::ColorPrinter
- Inherits:
-
Printer
- Object
- Printer
- Prissy::ColorPrinter
show all
- Includes:
- Term::ANSIColor
- Defined in:
- lib/prissy/color_printer.rb
Instance Attribute Summary
Attributes inherited from Printer
#options
Instance Method Summary
collapse
Methods inherited from Printer
#initialize, #print
Instance Method Details
#print_false ⇒ Object
26
27
28
|
# File 'lib/prissy/color_printer.rb', line 26
def print_false
@txt << green{"false"}
end
|
#print_key(key) ⇒ Object
19
20
21
|
# File 'lib/prissy/color_printer.rb', line 19
def print_key(key)
super cyan{key}
end
|
#print_literal(char) ⇒ Object
15
16
17
|
# File 'lib/prissy/color_printer.rb', line 15
def print_literal(char)
super green{char}
end
|
#print_null ⇒ Object
29
30
31
|
# File 'lib/prissy/color_printer.rb', line 29
def print_null
@txt << green{"null"}
end
|
#print_number(number) ⇒ Object
11
12
13
|
# File 'lib/prissy/color_printer.rb', line 11
def print_number(number)
super yellow{number.to_s}
end
|
#print_string(string, starting_column) ⇒ Object
7
8
9
|
# File 'lib/prissy/color_printer.rb', line 7
def print_string(string, starting_column)
super blue{string}
end
|
#print_true ⇒ Object
23
24
25
|
# File 'lib/prissy/color_printer.rb', line 23
def print_true
@txt << green{"true"}
end
|