lib/fuzzy_realty.rb in rkneufeld-fuzzy-realty-0.7.0 vs lib/fuzzy_realty.rb in rkneufeld-fuzzy-realty-0.7.1

- old
+ new

@@ -1,7 +1,5 @@ -require 'benchmark' - require 'weights.rb' require 'classes.rb' require 'scores_table.rb' require 'rulebase.rb' @@ -31,10 +29,12 @@ end end #When running the library directly calculate an example if __FILE__ == $0 + require 'benchmark' + listings = [] 1000.times do |i| listings << FuzzyRealty::Listing.random end @@ -63,6 +63,6 @@ puts "Query 2, $99k Bungalow in the ever so average 'C' block. 1200 sq. ft." puts "Top 20 Listings:" scores[(0..20)].each do |score| puts "%.2f" % score[:score] + "\t\t#{score[:listing].inspect}" end -end \ No newline at end of file +end