るりまサーチ

最速Rubyリファレンスマニュアル検索!
315件ヒット [1-100件を表示] (0.169秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:h[x] > クエリ:code[x]

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils cp_r
  5. bigdecimal to_r

検索結果

<< 1 2 3 ... > >>

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

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

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

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

//...
...emlist[例][ruby]{
r
equire 'net/http'

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

String#each_codepoint -> Enumerator (15430.0)

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

...

UTF-8/UTF-16(BE|LE)/UTF-32(BE|LE) 以外のエンコーディングに対しては
各文字のバイナリ表現由来の値になります。

//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...

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

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

...

UTF-8/UTF-16(BE|LE)/UTF-32(BE|LE) 以外のエンコーディングに対しては
各文字のバイナリ表現由来の値になります。

//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...

ARGF.class#each_codepoint -> Enumerator (15400.0)

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

...た場合には、Enumerator を返します。

例:
# $ echo "line1\n" > test1.txt
# $ echo "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,1...

StringIO#each_codepoint -> Enumerator (15400.0)

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

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

@see IO#each_codepoint...

絞り込み条件を変える

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

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

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

@see IO#each_codepoint...

ARGF.class#each_codepoint { |c| ... } -> self (15300.0)

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

...た場合には、Enumerator を返します。

例:
# $ echo "line1\n" > test1.txt
# $ echo "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,1...

RDoc::CodeObject#document_children -> bool (15300.0)

自身に含まれるメソッド、エイリアス、定数や属性をドキュメントに含めるか どうかを返します。

...自身に含まれるメソッド、エイリアス、定数や属性をドキュメントに含めるか
どうかを返します。

@see RDoc::CodeObject#document_self...

RDoc::CodeObject#remove_methods_etc -> () (15300.0)

何もしません。RDoc::CodeObject#document_self= に false を指定した 時のコールバックとして呼び出されます。オーバーライドして使用します。

...何もしません。RDoc::CodeObject#document_self= に false を指定した
時のコールバックとして呼び出されます。オーバーライドして使用します。...

Digest.#hexencode(string) -> String (12500.0)

引数である文字列 string を、16進数に変換した文字列を生成して返します。

...列 string を、16進数に変換した文字列を生成して返します。

@param string 文字列を指定します。

//emlist[][ruby]{
r
equire 'digest'

p Digest.hexencode("") # => ""
p Digest.hexencode("d") # => "64"
p Digest.hexencode("\1\2") # => "0102"
p Digest.hexencode("\xB0")...
...Digest::MD5.digest("ruby") # => "X\xE5=\x13$\xEE\xF6&_\xDB\x97\xB0\x8E\xD9\xAA\xDF"
p Digest.hexencode(digest) # => "58e53d1324eef6265fdb97b08ed9aadf"
p Digest::MD5.hexdigest("ruby") # => "58e53d1324eef6265fdb97b08ed9aadf"

p digest = Digest::SHA1.digest("ruby") # => "\x18\x...
...\x81"
p Digest.hexencode(digest) # => "18e40e1401eef67e1ae69efab09afb71f87ffb81"
p Digest::SHA1.hexdigest("ruby") # => "18e40e1401eef67e1ae69efab09afb71f87ffb81"
//}

文字列から16進数に変換したハッシュ値を直接得たい場合は、Digest::Base.hexdigest を...

絞り込み条件を変える

WEBrick::HTTPStatus.#reason_phrase(code) -> String (12407.0)

指定された整数が表すステータスコードに対応する reason phrase を表す文字列を返します。

...定された整数が表すステータスコードに対応する reason phrase
を表す文字列を返します。

@param code HTTP のステータスコードを表す整数か文字列を指定します。

r
equire 'webrick'
p WEBrick::HTTPStatus.reason_phrase(304) #=> "Not Modified"...
<< 1 2 3 ... > >>