220件ヒット
[101-200件を表示]
(0.073秒)
種類
- インスタンスメソッド (132)
- ライブラリ (60)
- 特異メソッド (12)
- モジュール関数 (12)
- 文書 (4)
ライブラリ
- ビルトイン (12)
-
cgi
/ core (12) -
rake
/ rdoctask (24) -
rdoc
/ context (48) -
rexml
/ document (48)
クラス
- CGI (12)
-
RDoc
:: Context (12) -
RDoc
:: Context :: Section (36) -
RDoc
:: Options (12) -
REXML
:: DocType (48) -
Rake
:: RDocTask (24)
モジュール
- Process (12)
キーワード
-
NEWS for Ruby 3
. 1 . 0 (4) -
attribute
_ of (12) -
attributes
_ of (12) - cgi (12)
-
cgi
/ session (12) -
external
_ id (12) - header (12)
- new (12)
- rdoc (12)
-
rexml
/ document (12) - rss (12)
-
set
_ comment (12) -
set
_ current _ section (12) - setproctitle (12)
- write (12)
検索結果
先頭5件
-
CGI
# header(options = "text / html") -> String (196.0) -
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。
...ん。
ヘッダのキーとしては以下が利用可能です。
: type
Content-Type ヘッダです。デフォルトは "text/html" です。
: charset
ボディのキャラクタセットを Content-Type ヘッダに追加します。
: nph
真偽値を指定します。真ならば、......応します。
: length
送信するコンテンツの長さを指定します。Content-Length ヘッダに対応します。
: language
送信するコンテンツの言語を指定します。Content-Language ヘッダに対応します。
: expires
送信するコンテンツの有効期......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... -
rexml
/ document (144.0) -
DOM スタイルの XML パーサ。
...'pp'
Bookmark = Struct.new(:href, :title, :desc)
doc = REXML::Document.new(<<XML)
<?xml version="1.0" encoding="UTF-8" ?>
<xbel version="1.0">
<bookmark href="http://www.ruby-lang.org/ja/">
<title>オブジェクト指向スクリプト言語 Ruby</title>
<desc>Rubyの公式サイト</d......clear-code.com/">
<title>最速Rubyリファレンスマニュアル検索! | るりまサーチ</title>
<desc>Rubyリファレンスマニュアルを全文検索できる。
とても便利。
</desc>
</bookmark>
<bookmark href="https://github.com/rurema/bitclust">
<title>rur......itHub</title>
</bookmark>
<bookmark href="https://rubygems.org/gems/bitclust-core" />
</xbel>
XML
bookmarks = REXML::XPath.match(doc, "/xbel/bookmark").map do |bookmark|
href = bookmark.attribute("href").value
title_element = bookmark.elements["title"]
title = title_element ? title_eleme... -
REXML
:: DocType # external _ id -> String | nil (118.0) -
DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。
...html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.name # => "html"
doctype.external_id # => "PUBLIC"
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT books (book+)>
<!ELEMENT book (title,author)>... -
Rake
:: RDocTask # options -> Array (118.0) -
rdoc コマンドに渡すオプションのリストを返します。
...rdoc コマンドに渡すオプションのリストを返します。
指定できるオプションは -o, --main, --title, -T 以外です。... -
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (112.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。
...REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
]>
EOS
p doctype.attribute_of("book", "publisher") # => "foobar publisher"
p doctype.attribute_of("bar", "foo") # => nil
p doctype.attribute_of("book", "baz") # => nil
p doctype.attribute_of("book", "title") # =>... -
REXML
:: DocType # attributes _ of(element) -> [REXML :: Attribute] (112.0) -
DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。
...t)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
]>
EOS
p doctype.attributes_of("book")
# => [author='', title='', publisher='foobar publisher']
p doctype.attributes_of("book")[0].name # =>... -
RDoc
:: Context :: Section # set _ comment(comment) -> () (106.0) -
自身にコメントを設定します。
...初の行に :section: を含んでいた場合、その行以降の文字列をコ
メントとして設定します。そうでない場合は comment すべてをコメントとして
設定します。
# ---------------------
# :section: The title
# The body
# ---------------------... -
REXML
:: DocType # write(output , indent = 0 , transitive = false , ie _ hack = false) -> () (106.0) -
output に DTD を出力します。
...nt.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
EOS
doctype.write(STDOU... -
cgi
/ session (84.0) -
CGI のセッション管理を行うライブラリ。
...ire 'cgi/session'
cgi = CGI.new('html3')
File.umask(0077)
session = CGI::Session.new(cgi)
cgi.out('charset'=>'euc-jp') {
html = cgi.html {
cgi.head { cgi.title {'Form Demo'} }
cgi.body {
cgi.form('action'=>"#{CGI.escapeHTML(cgi.script_name)}") {
cgi.p {......')
}
}
}
}
CGI.pretty(html)
}
#=>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<BODY>
<FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded" action="/sample.rb">
<P>
あなたの名前は?
<INP......d.empty?
@header = { "type" => "text/html", "charset" => "euc-jp" }
__send__("cmd_#{@cmd}")
end
def cmd_start
@cgi.out(@header) {
<<-END
<html><head><title>CGI::Session Demo</title></head>
<body>
<form action="#{CGI.escapeHTML(EN...