190件ヒット
[101-190件を表示]
(0.079秒)
別のキーワード
ライブラリ
- ビルトイン (58)
-
cgi
/ core (12) -
irb
/ cmd / help (12) - json (12)
- rake (12)
-
rexml
/ document (48) -
rubygems
/ gem _ path _ searcher (12) - uri (24)
クラス
- CGI (12)
-
Gem
:: GemPathSearcher (12) -
IRB
:: ExtendCommand :: Help (12) -
REXML
:: DocType (12) -
REXML
:: Element (12) -
REXML
:: Text (24) -
Rake
:: FileList (12) -
RubyVM
:: InstructionSequence (10) - String (48)
-
URI
:: MailTo (24)
モジュール
キーワード
- execute (12)
-
external
_ id (12) - header (12)
-
lib
_ dirs _ for (12) - next (12)
- next! (12)
- succ (12)
- succ! (12)
- text (12)
-
to
_ binary (10) -
to
_ json (12) -
to
_ mailtext (12) -
to
_ rfc822text (12) -
to
_ s (12) - value (12)
検索結果
先頭5件
-
REXML
:: DocType # external _ id -> String | nil (6315.0) -
DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。
...を返します。
//emlist[][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.name # => "html"
doctype.external_id # => "PUBLIC"
doctyp......e = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT books (book+)>
<!ELEMENT book (title,author)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
]>
EOS
doctype.name # => "books"
doctype.external_id # => nil
//}... -
REXML
:: Element # text(path = nil) -> String | nil (6315.0) -
先頭のテキスト子ノードの文字列を返します。
...EXML::Text#value も参照してください。
path を渡した場合は、その XPath 文字列で指定される
テキストノードの文字列を返します。
テキストノードがない場合には nil を返します。
@param path XPath文字列
@see REXML::Element#get_text
//em......list[][ruby]{
require 'rexml/document'
doc = REXML::Document.new "<p>some text <b>this is bold!</b> more text</p>"
# doc.root (<p> ... </p>) は2つのテキストノード("some text " と " more text"
# を持っているが、前者を返す
doc.root.text # => "some text "
//}... -
REXML
:: Text # to _ s -> String (3215.0) -
テキストの内容を正規化(すべての実体をエスケープ)された状態で返します。
...返り値は XML のテキストとして妥当です。
結果は REXML::Text.new で指定した entity_filter を反映しています。
@see REXML::Text#value
//emlist[][ruby]{
require 'rexml/document'
t = REXML::Text.new("< & foobar", false, nil, false)
t.to_s # => "< & foobar"
t.val... -
REXML
:: Text # value -> String (3215.0) -
テキストの内容を非正規化(すべての実体をアンエスケープ)された状態で返します。
...。
このメソッドの返り値では raw モードや entity_filter は無視されます。
@see REXML::Text#raw, REXML::Text#to_s
//emlist[][ruby]{
require 'rexml/document'
t = REXML::Text.new("< & foobar", false, nil, false)
t.to_s # => "< & foobar"
t.value # => "< & foobar"
//}... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (3081.0) -
RI から Ruby のドキュメントを参照します。
...RI から Ruby のドキュメントを参照します。
irb(main):001:0> help String#match
...
@param names 参照したいクラス名やメソッド名などを文字列で指定します。
names を指定しなかった場合は、RI を対話的なモードで起動します。メソ......:001:0> help
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.match(pattern) -> matchdat... -
CGI
# header(options = "text / html") -> String (315.0) -
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。
...を変換しません。
ヘッダのキーとしては以下が利用可能です。
: type
Content-Type ヘッダです。デフォルトは "text/html" です。
: charset
ボディのキャラクタセットを Content-Type ヘッダに追加します。
: nph
真偽値を指定します......HTTP ヘッダを生成するための情報を指定します。
例:
header
# Content-Type: text/html
header("text/plain")
# Content-Type: text/plain
header({"nph" => true,
"status" => "OK", # == "200 OK"......=> ENV['SERVER_SOFTWARE'],
"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.... -
Gem
:: GemPathSearcher # lib _ dirs _ for(spec) -> String (221.0) -
ライブラリの格納されているディレクトリを glob に使える形式で返します。
...ライブラリの格納されているディレクトリを glob に使える形式で返します。
例:
'/usr/local/lib/ruby/gems/1.8/gems/foobar-1.0/{lib,ext}'... -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (221.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...す。
//emlist[例][ruby]{
require "json"
class Person
attr :name, :age
def initialize(name, age)
@name, @age = name, age
end
end
tanaka = Person.new("tanaka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator::Generato...