Class: Kojak::Printer
- Inherits:
-
Object
- Object
- Kojak::Printer
- Defined in:
- lib/kojak/printer.rb
Overview
Internal: Abstract design of a printing class.
This is just a stub with documentation, implement actual printers in inherited classes.
Defined Under Namespace
Classes: Basic, Colorized, Nulled, RandomlyColorized, Synchronized
Instance Method Summary collapse
-
#puts(s, *args) ⇒ Object
Public: Writes given string and a newline.
-
#write(s, *args) ⇒ Object
Public: Writes given string to the output.
Instance Method Details
#puts(s, *args) ⇒ Object
Public: Writes given string and a newline.
s - The String to print. args - The Array with interpolation arguments.
Should return number of writen characters.
15 16 17 |
# File 'lib/kojak/printer.rb', line 15 def puts(s, *args) write("#{s}\n", *args) end |
#write(s, *args) ⇒ Object
Public: Writes given string to the output.
s - The String to print. args - The Array with interpolation arguments.
Should return number of written characters.
25 26 |
# File 'lib/kojak/printer.rb', line 25 def write(s, *args) end |