Class: Prissy::ColorPrinter

Inherits:
Printer
  • Object
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

Constructor Details

This class inherits a constructor from Prissy::Printer

Instance Method Details



26
27
28
# File 'lib/prissy/color_printer.rb', line 26

def print_false
  @txt << green{"false"}
end


19
20
21
# File 'lib/prissy/color_printer.rb', line 19

def print_key(key)
  super cyan{key}
end


15
16
17
# File 'lib/prissy/color_printer.rb', line 15

def print_literal(char)
  super green{char}
end


29
30
31
# File 'lib/prissy/color_printer.rb', line 29

def print_null
  @txt << green{"null"}
end


11
12
13
# File 'lib/prissy/color_printer.rb', line 11

def print_number(number)
  super yellow{number.to_s}
end


7
8
9
# File 'lib/prissy/color_printer.rb', line 7

def print_string(string, starting_column)
  super blue{string}
end


23
24
25
# File 'lib/prissy/color_printer.rb', line 23

def print_true
  @txt << green{"true"}
end