るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

REXML::Element#text(path = nil) -> String | nil (18374.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| ... } -> () (12375.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 (12292.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...

String#+@ -> String | self (9327.0)

self が freeze されている文字列の場合、元の文字列の複製を返します。 freeze されていない場合は self を返します。

...ist[例][ruby]{
# frozen_string_literal: false

original_text = "text"
unfrozen_text = +original_text
unfrozen_text.frozen? # => false
original_text == unfrozen_text # => true
original_text.equal?(unfrozen_text) # => true

original_text = "text".freeze
unfrozen_text = +origi...
...nal_text
unfrozen_text.frozen? # => false
original_text == unfrozen_text # => true
original_text.equal?(unfrozen_text) # => false
//}

@
see String#-@...

String#-@ -> String | self (9327.0)

self が freeze されている文字列の場合、self を返します。 freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。

...list[例][ruby]{
# frozen_string_literal: false

original_text = "text"
frozen_text = -original_text
frozen_text.frozen? # => true
original_text == frozen_text # => true
original_text.equal?(frozen_text) # => false

original_text = "text".freeze
frozen_text = -original_text...
...frozen_text.frozen? # => true
original_text == frozen_text # => true
original_text.equal?(frozen_text) # => true
//}

@
see String#+@...

絞り込み条件を変える

URI::MailTo#to_rfc822text -> String (9292.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 (9119.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 (9119.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 (6475.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 "
//}...
<< 1 2 3 > >>