169件ヒット
[1-100件を表示]
(0.115秒)
種類
- インスタンスメソッド (132)
- 文書 (26)
- 特異メソッド (11)
ライブラリ
- ビルトイン (77)
- ipaddr (11)
-
rubygems
/ commands / dependency _ command (11) - socket (44)
クラス
- Array (55)
- BasicSocket (44)
-
Gem
:: Commands :: DependencyCommand (11) - IPAddr (11)
- String (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
NEWS for Ruby 3
. 0 . 0 (4) -
do
_ not _ reverse _ lookup (22) - each (22)
-
each
_ index (22) -
find
_ reverse _ dependencies (11) - getpeername (11)
- getsockname (11)
- reverse! (11)
-
reverse
_ each (11) -
ruby 1
. 6 feature (11)
検索結果
先頭5件
-
String
# reverse -> String (21313.0) -
文字列を文字単位で左右逆転した文字列を返します。
...文字列を文字単位で左右逆転した文字列を返します。
//emlist[例][ruby]{
p "foobar".reverse # => "raboof"
p "".reverse # => ""
//}... -
IPAddr
# reverse -> String (21307.0) -
DNS 逆引きのための文字列を返します。 IPv6 なら 3172 で定義された形式で返します。
...DNS 逆引きのための文字列を返します。
IPv6 なら 3172 で定義された形式で返します。
例:
require "ipaddr"
p IPAddr.new("192.168.0.1").reverse # => "1.0.168.192.in-addr.arpa"... -
Gem
:: Commands :: DependencyCommand # find _ reverse _ dependencies(spec) -> Array (12301.0) -
与えられた Gem スペックに依存する Gem のリストを返します。
...与えられた Gem スペックに依存する Gem のリストを返します。
@param spec Gem::Specification のインスタンスを指定します。... -
BasicSocket
# do _ not _ reverse _ lookup -> bool (9237.0) -
ソケットごとのアドレスからホスト名への逆引きの設定を返します。
...成したときの
BasicSocket.do_not_reverse_lookup の値になります。
require 'socket'
BasicSocket.do_not_reverse_lookup = false
TCPSocket.open("www.ruby-lang.org", 80) {|sock|
p sock.do_not_reverse_lookup # => false
}
BasicSocket.do_not_reverse_lookup = true
TCPSocket.......open("www.ruby-lang.org", 80) {|sock|
p sock.do_not_reverse_lookup # => true
}
@see BasicSocket#do_not_reverse_lookup=... -
BasicSocket
. do _ not _ reverse _ lookup -> bool (9217.0) -
Socket#do_not_reverse_lookup の Socket オブジェクト生成時の デフォルト値を返します。
...Socket#do_not_reverse_lookup の Socket オブジェクト生成時の
デフォルト値を返します。
この設定は大域的に作用します。
デフォルトは true です。... -
String
# reverse! -> self (9207.0) -
文字列を文字単位で左右逆転します。
...文字列を文字単位で左右逆転します。
//emlist[例][ruby]{
str = "foobar"
str.reverse!
p str # => "raboof"
//}... -
Array
# reverse _ each {|item| . . . } -> self (6314.0) -
各要素に対して逆順にブロックを評価します。
...て逆順にブロックを評価します。
ブロックが与えられなかった場合は、自身と reverse_each から生成した
Enumerator オブジェクトを返します。
//emlist[例][ruby]{
a = [ "a", "b", "c" ]
a.reverse_each {|x| print x, " " }
# => c b a
//}
@see Array#each... -
Array
# each _ index {|index| . . . . } -> self (6306.0) -
各要素のインデックスに対してブロックを評価します。
...を評価します。
以下と同じです。
//emlist[例][ruby]{
(0 ... ary.size).each do |index|
# ....
end
//}
ブロックが与えられなかった場合は、自身と each_index から生成した
Enumerator オブジェクトを返します。
@see Array#each, Array#reverse_each... -
Array
# each _ index -> Enumerator (6206.0) -
各要素のインデックスに対してブロックを評価します。
...を評価します。
以下と同じです。
//emlist[例][ruby]{
(0 ... ary.size).each do |index|
# ....
end
//}
ブロックが与えられなかった場合は、自身と each_index から生成した
Enumerator オブジェクトを返します。
@see Array#each, Array#reverse_each... -
BasicSocket
# getpeername -> String (3206.0) -
接続の相手先のソケットの情報を取得します。sockaddr 構造体をパッ クした文字列を返します。getpeername(2) を参照してください。
...require 'socket'
serv = TCPServer.open("", 0)
c = TCPSocket.open(*Socket.unpack_sockaddr_in(serv.getsockname).reverse)
s = serv.accept
addr = c.getpeername
p addr #=> "\002\000\267\214\177\000\000\001\000\000\000\000\000\000\000\000"
p Socket.unpack_sockaddr_in(addr) #=> [4698......8, "127.0.0.1"]
p addr == s.getsockname #=> true...