ヤラレた
typo から trackback ping か何かを送信する機能らしい部分。
def send_pings(articleurl, urllist) # we need to transform the body now # because we need to sent out an except based on the html representation transform_body urllist.to_a.each do |url| begin ping = pings.build("url" => url) ping.send_ping(articleurl) ping.save rescue # in case the remote server doesn't respond or gives an error, # we should throw an xmlrpc error here. end end end
てっきり pings って Net::HTTP か何かの部品かと勘違いしていたら app/models に存在。がしかしクラスの名前は Ping だったりする事に気づく。違うのか、と思いきや has_many なソレでアクセサが追加されるとの文書を発見。build というメソドの謎も解ける。
帰宅後の成果は 4 行。(とほほほ