216件ヒット
[1-100件を表示]
(0.092秒)
別のキーワード
ライブラリ
- ビルトイン (36)
-
rake
/ rdoctask (12) -
rexml
/ document (60) -
rexml
/ parsers / pullparser (12) -
rexml
/ sax2listener (12) -
rexml
/ streamlistener (12) -
webrick
/ httpresponse (72)
クラス
-
REXML
:: DocType (60) -
REXML
:: Parsers :: PullEvent (12) -
Rake
:: RDocTask (12) - String (24)
-
WEBrick
:: HTTPResponse (72)
モジュール
- Enumerable (12)
-
REXML
:: SAX2Listener (12) -
REXML
:: StreamListener (12)
キーワード
- [] (12)
-
attribute
_ of (12) -
attributes
_ of (12) - body= (12)
- chunk (12)
- chunked= (12)
-
content
_ length (12) -
content
_ length= (12) - context (12)
- doctype (24)
- doctype? (12)
- external (12)
-
node
_ type (12) - public (12)
-
to
_ i (12) -
to
_ s (12)
検索結果
先頭5件
-
String
# oct -> Integer (18198.0) -
文字列を 8 進文字列であると解釈して、整数に変換します。
...mlist[例][ruby]{
p "10".oct # => 8
p "010".oct # => 8
p "8".oct # => 0
//}
oct は文字列の接頭辞 ("0", "0b", "0B", "0x", "0X") に応じて
8 進以外の変換も行います。
//emlist[例][ruby]{
p "0b10".oct # => 2
p "10".oct # => 8
p "010".oct # => 8
p "0x10".oct # => 16
//......返します。
符号や _ が含まれる場合も変換対象になります。
//emlist[例][ruby]{
p "-010".oct # => -8
p "-0x10".oct # => -16
p "-0b10".oct # => -2
p "1_0_1x".oct # => 65
//}
@see String#hex, String#to_i, String#to_f,
Kernel.#Integer, Kernel.#Float
逆に... -
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (9201.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。
...宣言で、 element という名前の要素の attribute という
名前の属性のデフォルト値を返します。
elementという名前の要素の属性値は宣言されていない、
elementという名前の要素にはattributeという名前の属性が宣言されていない、......bute 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foob......ar 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") # => nil
//}... -
REXML
:: DocType # attributes _ of(element) -> [REXML :: Attribute] (9201.0) -
DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。
...::Attribute の配列で返します。
名前とデフォルト値のペアは、各 Attribute オブジェクトの
REXML::Attribute#name と
REXML::Attribute#value で表現されます。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [......ENT book (comment)>
<!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("boo......k")[0].name # => "author"
p doctype.attributes_of("book")[0].value # => ""
//}... -
REXML
:: DocType # public -> String | nil (9101.0) -
DTD の公開識別子を返します。
...list[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype.public # =>......"-//W3C//DTD XHTML 1.0 Strict//EN"
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root SYSTEM "foobar">
EOS
doctype.system # => "foobar"
doctype.public # => nil
//}... -
REXML
:: Parsers :: PullEvent # doctype? -> bool (6201.0) -
DTD 開始なら真を返します。
DTD 開始なら真を返します。 -
REXML
:: SAX2Listener # doctype(name , pub _ sys , long _ name , uri) -> () (6201.0) -
文書型宣言(DTD)に出会った時に呼び出されるコールバックメソッドです。
...aram pub_sys "PUBLIC" もしくは "SYSTEM" が渡されます。nilが渡される場合もあります。
@param long_name "SYSTEM" の場合はシステム識別子が、"PUBLIC"の場合は公開識別子が
文字列で渡されます
@param uri "SYSTEM" の場合は nil が、"PUBLIC"... -
REXML
:: StreamListener # doctype(name , pub _ sys , long _ name , uri) -> () (6201.0) -
文書型宣言(DTD)をパースしたときに呼び出されるコールバックメソッドです。
...ルバックメソッドです。
pub_sys, long_name, uri はDTDが内部サブセットのみを
利用している場合には nil が渡されます。
@param name 宣言されているルート要素名が文字列で渡されます。
@param pub_sys "PUBLIC" もしくは "SYSTEM" が渡され......子が、"PUBLIC"の場合は公開識別子が
文字列で渡されます
@param uri "SYSTEM" の場合は nil が、"PUBLIC" の場合はシステム識別子が渡されます
=== 例
<!DOCTYPE me PUBLIC "foo" "bar">
というDTDに対しては
name: "me"
pub_sys: "PUBLIC"
long_n......ame: "foo"
uri: "bar"
という引数が渡されます。
<!DOCTYPE root [
...
というDTDに対しては
name: "root"
pub_sys: nil
long_name: nil
uri: nil
という引数が渡されます。... -
WEBrick
:: HTTPResponse # body=(val) (6107.0) -
クライアントに返す内容(エンティティボディ)をセットします。
...クライアントに返す内容(エンティティボディ)をセットします。
自身が chunked であっても body の値はチャンク形式ではありません。
@param val メッセージボディを文字列か IO オブジェクトで指定します。
自身が chun......ンコーディングされます。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:58:49 GMT
Server:
Content-Length: 4... -
REXML
:: DocType # context -> { Symbol => object } (3101.0) -
DTD が属する文書の「コンテキスト」を返します。
DTD が属する文書の「コンテキスト」を返します。
具体的には親ノードである REXML::Document オブジェクトの
REXML::Element#context を返します。
コンテキストの具体的な内容については REXML::Element#context を
参照してください。