Class: Taxbear::TableBuilder
- Inherits:
-
Object
- Object
- Taxbear::TableBuilder
- Defined in:
- lib/taxbear/table_builder.rb
Class Method Summary collapse
-
.print_rates_for_zipcode(rates, zipcode) ⇒ nil
Takes the rates and prints them as a nice table to STDOUT.
Class Method Details
.print_rates_for_zipcode(rates, zipcode) ⇒ nil
Takes the rates and prints them as a nice table to STDOUT.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/taxbear/table_builder.rb', line 12 def print_rates_for_zipcode(rates, zipcode) output = "" output << "\n" output << Terminal::Table.new( title: "Sales Tax Rates for #{zipcode}", headings: align_each_cell_center(get_header_rows(rates)), rows: [align_each_cell_center(format_rates(rates))] ).to_s output << "\n\n" puts output end |