Class: Rbsiev::Printer
- Inherits:
-
Object
- Object
- Rbsiev::Printer
- Defined in:
- lib/rbsiev/printer.rb
Instance Attribute Summary collapse
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
-
#initialize ⇒ Printer
constructor
A new instance of Printer.
- #print(value) ⇒ Object
Constructor Details
#initialize ⇒ Printer
Returns a new instance of Printer.
5 6 7 |
# File 'lib/rbsiev/printer.rb', line 5 def initialize @verbose = false end |
Instance Attribute Details
#verbose ⇒ Object
Returns the value of attribute verbose.
9 10 11 |
# File 'lib/rbsiev/printer.rb', line 9 def verbose @verbose end |
Instance Method Details
#print(value) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/rbsiev/printer.rb', line 11 def print(value) if @verbose pp verbose end puts value.to_s end |