るりまサーチ

最速Rubyリファレンスマニュアル検索!
412件ヒット [1-100件を表示] (0.094秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

REXML::Element#text(path = nil) -> String | nil (18362.0)

先頭のテキスト子ノードの文字列を返します。

...::Text#value も参照してください。

path を渡した場合は、その XPath 文字列で指定される
テキストノードの文字列を返します。

テキストノードがない場合には nil を返します。

@param path XPath文字列
@see REXML::Element#get_text

//emlist...
...[][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::Element#each_element_with_text(text = nil, max = 0, name = nil) {|element| ... } -> () (12357.0)

テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。

...テキストを子ノードとして
持つすべての子要素を引数としてブロックを呼び出します。

text
を指定すると、テキストの内容が text であるもののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対...
...)。

@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
doc.root.each_element_with_text {|e|p e}
#...
...>> <b> ... </>
# >> <c> ... </>
# >> <d> ... </>
doc.root.each_element_with_text('b'){|e|p e}
# >> <b> ... </>
# >> <c> ... </>
doc.root.each_element_with_text('b', 1){|e|p e}
# >> <b> ... </>
doc.root.each_element_with_text(nil, 0, 'd'){|e|p e}
# >> <d> ... </>
//}...

URI::MailTo#to_mailtext -> String (12274.0)

URI オブジェクトからメールテキスト文字列を生成します。

...URI オブジェクトからメールテキスト文字列を生成します。

例:
require 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext

=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&...
...cc=myaddr>
To: ruby-list@ruby-lang.org
Subject: subscribe
Cc: myaddr...

URI::MailTo#to_rfc822text -> String (9274.0)

URI オブジェクトからメールテキスト文字列を生成します。

...URI オブジェクトからメールテキスト文字列を生成します。

例:
require 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext

=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&...
...cc=myaddr>
To: ruby-list@ruby-lang.org
Subject: subscribe
Cc: myaddr...

IRB::Context#use_readline -> bool | nil (9113.0)

readline を使うかどうかを返します。

...readline を使うかどうかを返します。

@return 戻り値よって以下のように動作します。

: true
readline ライブラリを使う
: false
readline ライブラリを使わない
: nil
i
nf-ruby-mode 以外で readline ライブラリを利用しようとする (...
...デフォルト)

動作を変更するためには .irbrc ファイル中で IRB.conf[:USE_READLINE] の設
定や irb 起動時に --readline オプション、--noreadline オプションの指定
を行います。...

絞り込み条件を変える

IRB::Context#use_readline? -> bool | nil (9113.0)

readline を使うかどうかを返します。

...readline を使うかどうかを返します。

@return 戻り値よって以下のように動作します。

: true
readline ライブラリを使う
: false
readline ライブラリを使わない
: nil
i
nf-ruby-mode 以外で readline ライブラリを利用しようとする (...
...デフォルト)

動作を変更するためには .irbrc ファイル中で IRB.conf[:USE_READLINE] の設
定や irb 起動時に --readline オプション、--noreadline オプションの指定
を行います。...

REXML::Element#get_text(path = nil) -> REXML::Text | nil (6463.0)

先頭のテキスト子ノードを返します。

...ML::Text#value も参照してください。

path を渡した場合は、その XPath 文字列で指定される
テキストノードの文字列を返します。

テキストノードがない場合には nil を返します。

@param path XPath文字列
@see REXML::Element#text

//emlist[]...
...[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.get_text.value # => "some text "
//}...

Net::HTTPHeader#main_type -> String|nil (6251.0)

"text/html" における "text" のようなタイプを表す 文字列を返します。

..."text/html" における "text" のようなタイプを表す
文字列を返します。

Content-Type: ヘッダフィールドが存在しない場合には nil を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_r...
...esponse(uri)
res.main_type # => "text"
//}...

String#unicode_normalize!(form = :nfc) -> self (6143.0)

self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し た文字列に置き換えます。

...icode 正規化し
た文字列に置き換えます。

(gsub!などと異なり)変換が行なわれなくても self を返します。

@param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。

@rai...
...se Encoding::CompatibilityError self が Unicode 文字列ではない場合
に発生します。

//emlist[例][ruby]{
text
= "a\u0300"
text
.unicode_normalize!(:nfc)
text
== "\u00E0" # => true
text
.unicode_normalize!(:nfd)
text
== "a\u0300"...
...# => true
//}

@see String#unicode_normalize, String#unicode_normalized?...
<< 1 2 3 ... > >>