Class: GemsBond::Printers::Printer

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

Overview

Prints HTML file

Direct Known Subclasses

CSV, HTML

Constant Summary collapse

DIRECTORY_PATH =
"gems_bond"

Instance Method Summary collapse

Constructor Details

#initialize(gems) ⇒ GemsBond::Printers

Initializes an instance

Parameters:



14
15
16
# File 'lib/gems_bond/printers/printer.rb', line 14

def initialize(gems)
  @gems = gems
end

Instance Method Details

#callvoid

This method returns an undefined value.

Manages print



20
21
22
23
24
25
26
# File 'lib/gems_bond/printers/printer.rb', line 20

def call
  format = self.class.name.split("::").last
  puts "\nPreparing data for printing results into #{format} file..."
  create_directory
  print
  puts "Open file gems_bond/spy.#{format.downcase} to display the results."
end