class BinPacking::Export
Public Class Methods
new(*bins)
click to toggle source
# File lib/bin_packing/export.rb, line 3 def initialize(*bins) @bins = Array(bins).flatten end
Public Instance Methods
to_html(options = {})
click to toggle source
# File lib/bin_packing/export.rb, line 7 def to_html(options = {}) template_path = File.expand_path('../resources/export.html.erb', __FILE__) template = File.read(template_path) binding = ExportBinding.new(@bins, options[:zoom] || 1) html = ERB.new(template).result(binding.get_binding) html end