Class: Rbsiev::Printer

Inherits:
Object
  • Object
show all
Defined in:
lib/rbsiev/printer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePrinter

Returns a new instance of Printer.



5
6
7
# File 'lib/rbsiev/printer.rb', line 5

def initialize
  @verbose = false
end

Instance Attribute Details

#verboseObject

Returns the value of attribute verbose.



9
10
11
# File 'lib/rbsiev/printer.rb', line 9

def verbose
  @verbose
end

Instance Method Details



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