Sha256: 136959fb3c497b6a953b4a31cac2309ea44b320f523ac680afb04325eafe892f

Contents?: true

Size: 543 Bytes

Versions: 2

Compression:

Stored size: 543 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

2 entries across 2 versions & 1 rubygems

Version Path
ruote-0.9.19 examples/csv_weather.rb
ruote-0.9.20 examples/csv_weather.rb