class BinPacking::ScoreBoardEntry
Attributes
bin[R]
box[R]
score[R]
Public Class Methods
new(bin, box)
click to toggle source
# File lib/bin_packing/score_board_entry.rb, line 5 def initialize(bin, box) @bin = bin @box = box @score = nil end
Public Instance Methods
calculate()
click to toggle source
# File lib/bin_packing/score_board_entry.rb, line 11 def calculate @score = @bin.score_for(@box) end
fit?()
click to toggle source
# File lib/bin_packing/score_board_entry.rb, line 15 def fit? !@score.is_blank? end