LoginSignup
1
1

More than 5 years have passed since last update.

rubyでズンドコゲッター

Last updated at Posted at 2016-05-30

概要

paizaのrubyでズンドコゲッターやってみた。

実際

サンプルコード

require 'net/http'
require 'uri'

def zundoko
    url = "http://ohijs0.paas.jp-e1.cloudn-service.com/zundoko"
    uri = URI.parse(url)
    res = Net::HTTP.get(uri)
    return res.force_encoding("UTF-8")
end
i = 0
while true
    z = zundoko
    print z + " "
    if z != "ドコ" 
        if i == 4 
            break
        end
        i = 0
    else
        i = i + 1
    end
end
print "キ・ヨ・シ!"
1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1