class Minesweeper::Console::PrettyPrinter::HeaderPrinter

Public Class Methods

new(separator, theme) click to toggle source
# File lib/minesweeper/console/prettyprinter/header_printer.rb, line 5
def initialize(separator, theme)
  raise ArgumentError if separator.nil? || theme.nil?
  @separator = separator
  @theme = theme
end

Public Instance Methods

compute_column_width_for(number_of_columns) click to toggle source
# File lib/minesweeper/console/prettyprinter/header_printer.rb, line 25
def compute_column_width_for(number_of_columns)
  (number_of_columns - 1).to_s.length
end
print(number_of_columns) click to toggle source