るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dsa p
  5. rsa p

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Net::IMAP::ResponseText#code -> Net::IMAP::ResponseCode | nil (21302.0)

レスポンスコードを返します。

...レスポンスコードを返します。

応答がレスポンスコードを含んでいない場合は nil を返します。

@see Net::IMAP::ResponseCode...

Net::HTTPResponse#code -> String (21108.0)

HTTP のリザルトコードです。例えば '302' などです。

...HTTP のリザルトコードです。例えば '302' などです。

この値を見ることでレスポンスの種類を判別できますが、
レスポンスオブジェクトがどのクラスのインスタンスかを
見ることでもレスポンスの種類を判別できます。

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

uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.code # => "200"
//}...

String#codepoints {|codepoint| block } -> self (12401.0)

文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)

...each_codepoint.to_a と同じです)

//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}

ブロックが指定された場合は String#each_codepoint と同じように動作します。

Ruby 2.6 までは deprecat...
...ed の警告が出ますが、Ruby 2.7 で警告は削除されました。

@see String#each_codepoint...

String#each_codepoint {|codepoint| block } -> self (12401.0)

文字列の各コードポイントに対して繰り返します。

...ます。

//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
"hello わーるど".encode('euc-jp').each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 42223, 41404, 42219, 42185]
//}

@see String#codepoints...

StringIO#codepoints {|codepoint| ... } -> self (12401.0)

自身の各コードポイントに対して繰り返します。

...自身の各コードポイントに対して繰り返します。

@see IO#each_codepoint...

絞り込み条件を変える

StringIO#each_codepoint {|codepoint| ... } -> self (12401.0)

自身の各コードポイントに対して繰り返します。

...自身の各コードポイントに対して繰り返します。

@see IO#each_codepoint...

IO#each_codepoint -> Enumerator (12207.0)

IO の各コードポイントに対して繰り返しブロックを呼びだします。

...にはコードポイントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。

//emlist[例][ruby]{
IO.write("testfile", "abcdeあ")
File.open("testfile") do |f|
f.each_codepoint { |i| p i }
end
# => 97
# 98
# 99
# 100
# 101
# 12354
//}...

IO#each_codepoint {|c| ... } -> self (12207.0)

IO の各コードポイントに対して繰り返しブロックを呼びだします。

...にはコードポイントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。

//emlist[例][ruby]{
IO.write("testfile", "abcdeあ")
File.open("testfile") do |f|
f.each_codepoint { |i| p i }
end
# => 97
# 98
# 99
# 100
# 101
# 12354
//}...

Net::FTP#last_response_code -> String (12202.0)

サーバからの最後の応答のコードを文字列で返します。

...サーバからの最後の応答のコードを文字列で返します。

例えばログイン(Net::FTP#login)に成功した場合には
"230" を返します。

数字の意味は 959 参照してください。

@see Net::FTP#last_response...
<< 1 2 3 ... > >>