Sha256: b1de87a06c4168e0ba23390cc40b1db4444a101940b614b03e744678cf5fe31d
Contents?: true
Size: 553 Bytes
Versions: 5
Compression:
Stored size: 553 Bytes
Contents
require 'rubygems' require 'openwfe/extras/util/csvtable' include OpenWFE::Extras $table = CsvTable.new("http://spreadsheets.google.com/pub?key=pCkopoeZwCNsMWOVeDjR1TQ&output=csv&gid=0") def decide (hash) $table.transform hash puts " weather : #{hash['weather']}, month : #{hash['month']}" puts " => take umbrella ? #{hash['take_umbrella?']}" puts end puts decide({ "weather" => "raining", "month" => "december" }) decide({ "weather" => "sunny", "month" => "december" }) decide({ "weather" => "cloudy", "month" => "may" })
Version data entries
5 entries across 5 versions & 2 rubygems