48件ヒット
[1-48件を表示]
(0.079秒)
ライブラリ
- ビルトイン (12)
-
rexml
/ streamlistener (12) -
webrick
/ httputils (24)
クラス
- Object (12)
-
WEBrick
:: HTTPUtils :: FormData (24)
モジュール
キーワード
- entitydecl (12)
-
respond
_ to? (12) -
to
_ ary (12)
検索結果
先頭4件
-
WEBrick
:: HTTPUtils :: FormData # list -> Array (18114.0) -
自身が表す各フォームデータを収納した配列を生成して返します。
...自身が表す各フォームデータを収納した配列を生成して返します。
例:
require "webrick/cgi"
class MyCGI < WEBrick::CGI
def do_GET(req, res)
p req.query['q'].list #=> ["val1", "val2", "val3"]
end
end
MyCGI.new.start()... -
WEBrick
:: HTTPUtils :: FormData # to _ ary -> Array (3014.0) -
自身が表す各フォームデータを収納した配列を生成して返します。
...自身が表す各フォームデータを収納した配列を生成して返します。
例:
require "webrick/cgi"
class MyCGI < WEBrick::CGI
def do_GET(req, res)
p req.query['q'].list #=> ["val1", "val2", "val3"]
end
end
MyCGI.new.start()... -
REXML
:: StreamListener # entitydecl(content) -> () (3007.0) -
DTDの実体宣言をパースしたときに呼び出されるコールバックメソッドです。
...の書き方によって content に渡されるデータの形式が異なります。
//emlist[][ruby]{
require 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'
xml = <<EOS
<!DOCTYPE root [
<!ENTITY % YN '"Yes"'>
<!ENTITY % YN 'Yes'>
<!ENTITY WhatHeSa......l">
<!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif>
]>
<root />
EOS
class Listener
include REXML::StreamListener
def entitydecl(content); p content; end
end
REXML::Parsers::StreamParser.new(xml, Listener.new).parse
# >> ["YN", "\"Yes\"", "%"]
# >> ["YN", "Yes", "%"]
# >> ["WhatHe... -
Object
# respond _ to?(name , include _ all = false) -> bool (43.0) -
オブジェクトがメソッド name を持つとき真を返します。
...) を指定した事になります。
//emlist[][ruby]{
class F
def hello
"Bonjour"
end
end
class D
private
def hello
"Guten Tag"
end
end
list = [F.new,D.new]
list.each{|it| puts it.hello if it.respond_to?(:hello)}
#=> Bonjour
list.each{|it| it.instance_eval("puts hello if it.......ate_method
raise NotImplementedError.new
end
def finish
puts "finish"
end
end
class ImplTemplateMethod
include Template
def template_method
"implement template_method"
end
end
class NotImplTemplateMethod
include Template
# not implement template_method
end
puts ImplT...