種類
- インスタンスメソッド (82)
- 特異メソッド (55)
- モジュール関数 (12)
ライブラリ
- ビルトイン (89)
- json (12)
- openssl (12)
-
rexml
/ document (36)
クラス
- IO (24)
-
OpenSSL
:: SSL :: SSLContext (12) -
REXML
:: Element (36) - String (65)
モジュール
- JSON (12)
キーワード
- +@ (10)
- -@ (10)
- context= (12)
- dedup (3)
-
each
_ element _ with _ text (12) - new (31)
- parse! (12)
-
session
_ id _ context= (12) -
unicode
_ normalize! (11) - write (24)
検索結果
先頭5件
-
REXML
:: Element # text=(text) (18130.0) -
「先頭の」テキストノードを text で置き換えます。
...除されます。
@param text 置き換え後のテキスト(文字列、REXML::Text, nil(削除))
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a><b/></a>')
doc.to_s # => "<a><b/></a>"
doc.root.text = "Foo"; doc.to_s # => "<a><b/>Foo</a>"
doc.root.text = "Bar"; doc.to_s......# => "<a><b/>Bar</a>"
doc.root.add_element "c"
doc.root.text = "Baz"; doc.to_s # => "<a><b/>Baz<c/></a>"
doc.root.text = nil; doc.to_s # => "<a><b/><c/></a>"
//}... -
String
# +@ -> String | self (6130.0) -
self が freeze されている文字列の場合、元の文字列の複製を返します。 freeze されていない場合は self を返します。
...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 = +original_text
unfrozen_text.fr......ozen? # => false
original_text == unfrozen_text # => true
original_text.equal?(unfrozen_text) # => false
//}
@see String#-@... -
String
# -@ -> String | self (6130.0) -
self が freeze されている文字列の場合、self を返します。 freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
...ozen_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#+@... -
OpenSSL
:: SSL :: SSLContext # session _ id _ context=(id _ context) (6112.0) -
セッション ID コンテキストを文字列で設定します。
...念で
あることに注意してください。
クライアント側では意味を持ちません。
@param id_context セッション ID コンテキスト文字列(最大32バイト)
@see OpenSSL::SSL::Session,
OpenSSL::SSL::SSLContext#session_id_context,
OpenSSL::SSL::SSLContext#s... -
REXML
:: Element # context=(value) (6112.0) -
要素の「コンテキスト」を Hash で設定します。
...ます。
raw mode においては、text 中の特殊文字は一切変換されません。
REXML::Element#raw も参照してください。
nil を渡すことでデフォルト値を使うよう指示できます。
@param value 設定値
@see REXML::Element.new, REXML::Element#context... -
String
# dedup -> String | self (3030.0) -
self が freeze されている文字列の場合、self を返します。 freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
...ozen_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#+@... -
IO
. write(path , string , **opts) -> Integer (36.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...詳しくは IO.open を見てください。
@param path ファイル名文字列
@param string 書き込む文字列
@param offset 書き込み開始位置
@param opts ファイルを開くときのキーワード引数
//emlist[例][ruby]{
text = "This is line one\nThis is line two\nThis is li......text) # => 66
IO.write("testfile", "0123456789", 20) #=> 10
IO.read("testfile")
# => "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
IO.write("testfile", "0123456789") #=> 10
IO.read("testfile") # => "0123456789"
//}
@see IO.binwrite... -
IO
. write(path , string , offset=nil , **opts) -> Integer (36.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...詳しくは IO.open を見てください。
@param path ファイル名文字列
@param string 書き込む文字列
@param offset 書き込み開始位置
@param opts ファイルを開くときのキーワード引数
//emlist[例][ruby]{
text = "This is line one\nThis is line two\nThis is li......text) # => 66
IO.write("testfile", "0123456789", 20) #=> 10
IO.read("testfile")
# => "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
IO.write("testfile", "0123456789") #=> 10
IO.read("testfile") # => "0123456789"
//}
@see IO.binwrite... -
String
. new(string = "") -> String (30.0) -
string と同じ内容の新しい文字列を作成して返します。 引数を省略した場合は空文字列を生成して返します。
...同じ内容の新しい文字列を作成して返します。
引数を省略した場合は空文字列を生成して返します。
@param string 文字列
@param encoding 作成する文字列のエンコーディングを文字列か
Encoding オブジェクトで指定し......じになります(ただし、string が指定されていなかった場合は
Encoding::ASCII_8BITになります)。
@param capacity 内部バッファのサイズを指定します。
指定することで、なんども文字列連結する......未満であれば127、
それ以上であればstring.bytesizeになります。
@return 引数 string と同じ内容の文字列オブジェクト
//emlist[例][ruby]{
text = "hoge".encode("EUC-JP")
no_option = String.new(text) # => "hoge"
no_... -
String
. new(string = "" , encoding: string . encoding , capacity: 127) -> String (30.0) -
string と同じ内容の新しい文字列を作成して返します。 引数を省略した場合は空文字列を生成して返します。
...同じ内容の新しい文字列を作成して返します。
引数を省略した場合は空文字列を生成して返します。
@param string 文字列
@param encoding 作成する文字列のエンコーディングを文字列か
Encoding オブジェクトで指定し......じになります(ただし、string が指定されていなかった場合は
Encoding::ASCII_8BITになります)。
@param capacity 内部バッファのサイズを指定します。
指定することで、なんども文字列連結する......未満であれば127、
それ以上であればstring.bytesizeになります。
@return 引数 string と同じ内容の文字列オブジェクト
//emlist[例][ruby]{
text = "hoge".encode("EUC-JP")
no_option = String.new(text) # => "hoge"
no_... -
String
. new(string = "" , encoding: string . encoding , capacity: 63) -> String (30.0) -
string と同じ内容の新しい文字列を作成して返します。 引数を省略した場合は空文字列を生成して返します。
...同じ内容の新しい文字列を作成して返します。
引数を省略した場合は空文字列を生成して返します。
@param string 文字列
@param encoding 作成する文字列のエンコーディングを文字列か
Encoding オブジェクトで指定し......じになります(ただし、string が指定されていなかった場合は
Encoding::ASCII_8BITになります)。
@param capacity 内部バッファのサイズを指定します。
指定することで、なんども文字列連結する......未満であれば127、
それ以上であればstring.bytesizeになります。
@return 引数 string と同じ内容の文字列オブジェクト
//emlist[例][ruby]{
text = "hoge".encode("EUC-JP")
no_option = String.new(text) # => "hoge"
no_...