84件ヒット
[1-84件を表示]
(0.097秒)
別のキーワード
ライブラリ
- ビルトイン (12)
-
cgi
/ core (12) - erb (24)
-
irb
/ output-method (36)
クラス
- CGI (12)
- ERB (24)
-
IRB
:: OutputMethod (24) -
IRB
:: StdioOutputMethod (12) - Module (12)
キーワード
-
def
_ class (12) -
def
_ module (12) - header (12)
-
instance
_ method (12) - printn (12)
検索結果
先頭5件
-
IRB
:: OutputMethod # print(*objs) (24102.0) -
NotImplementedError が発生します。
NotImplementedError が発生します。
@param objs 任意のオブジェクトを指定します。
@raise NotImplementedError 必ず発生します。 -
IRB
:: StdioOutputMethod # print(*objs) -> nil (24102.0) -
引数を標準出力に出力します。
引数を標準出力に出力します。
@param objs 任意のオブジェクトを指定します。 -
Module
# instance _ method(name) -> UnboundMethod (12499.0) -
self のインスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
...クト化した UnboundMethod を返します。
@param name メソッド名を Symbol または String で指定します。
@raise NameError self に存在しないメソッドを指定した場合に発生します。
@see Module#public_instance_method, Object#method
//emlist[例][ruby]{
clas......r
def do_a() print "there, "; end
def do_d() print "Hello "; end
def do_e() print "!\n"; end
def do_v() print "Dave"; end
Dispatcher = {
"a" => instance_method(:do_a),
"d" => instance_method(:do_d),
"e" => instance_method(:do_e),
"v" => instance_method(:do_v)
}... -
IRB
:: OutputMethod # printn(*objs) -> nil (12101.0) -
各 obj を self に出力し、最後に改行を出力します。
各 obj を self に出力し、最後に改行を出力します。
@param objs 任意のオブジェクトを指定します。 -
ERB
# def _ class(superklass=Object , methodname=& # 39;erb& # 39;) -> Class (207.0) -
変換した Ruby スクリプトをメソッドとして定義した無名のクラスを返します。
...プトをメソッドとして定義した無名のクラスを返します。
@param superklass 無名クラスのスーパークラス
@param methodname メソッド名
//emlist[例][ruby]{
require 'erb'
class MyClass_
def initialize(arg1, arg2)
@arg1 = arg1; @arg2 = arg2
end
end
fi......lename = 'example.rhtml' # @arg1 と @arg2 が使われている example.rhtml
erb = ERB.new(File.read(filename))
erb.filename = filename
MyClass = erb.def_class(MyClass_, 'render()')
print MyClass.new('foo', 123).render()
# => test1foo
# test2123
//}... -
ERB
# def _ module(methodname=& # 39;erb& # 39;) -> Module (207.0) -
変換した Ruby スクリプトをメソッドとして定義した無名のモジュールを返します。
...します。
@param methodname メソッド名
//emlist[例][ruby]{
require 'erb'
filename = 'example.rhtml'
erb = ERB.new("test1<%= arg1 %>\ntest2<%= arg2 %>\n")
erb.filename = filename
MyModule = erb.def_module('render(arg1, arg2)')
class MyClass
include MyModule
end
print MyClass.new.render('... -
CGI
# header(options = "text / html") -> String (55.0) -
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。
...uthorization Required"
"FORBIDDEN" --> "403 Forbidden"
"NOT_FOUND" --> "404 Not Found"
"METHOD_NOT_ALLOWED" --> "405 Method Not Allowed"
"NOT_ACCEPTABLE" --> "406 Not Acceptable"
"LENGTH_REQUIRED" --> "411 Length Required"......ONDITION_FAILED" --> "412 Rrecondition Failed"
"SERVER_ERROR" --> "500 Internal Server Error"
"NOT_IMPLEMENTED" --> "501 Method Not Implemented"
"BAD_GATEWAY" --> "502 Bad Gateway"
"VARIANT_ALSO_VARIES" --> "506 Variant Also Negotiates"
@param opti......my_header1" => "my_value",
"my_header2" => "my_value"})
例:
cgi = CGI.new('html3')
print cgi.header({"charset" => "shift_jis", "status" => "OK"})
print "<html><head><title>TITLE</title></head>\r\n"
print "<body>BODY</body></html>\r\n"
@see 35911...