種類
- インスタンスメソッド (201)
- 特異メソッド (153)
- モジュール関数 (38)
ライブラリ
クラス
- Array (44)
- File (33)
- IO (11)
- Matrix (11)
-
Net
:: FTP (18) -
Net
:: FTP :: MLSxEntry (18) -
Net
:: HTTPGenericRequest (22) -
Net
:: HTTPResponse (11) - OptionParser (33)
- Pathname (22)
- Tempfile (50)
モジュール
- Kernel (38)
- OpenURI (22)
-
OpenURI
:: OpenRead (22) -
OptionParser
:: Arguable (11) - Psych (12)
- URI (14)
キーワード
-
body
_ permitted? (11) - create (20)
- facts (9)
- mlsd (18)
- new (21)
- open (138)
-
open
_ uri (22) - permutation (22)
- permutation? (11)
- permute (22)
- permute! (22)
-
repeated
_ permutation (22) -
request
_ body _ permitted? (11) -
response
_ body _ permitted? (11) -
safe
_ load (12) - sysopen (11)
検索結果
先頭5件
-
Net
:: FTP :: MLSxEntry # perm -> String|nil (18301.0) -
パーミッション文字列を返します。
...パーミッション文字列を返します。
情報がない場合は nil を返しますが、通常は
あるはずです。... -
Array
# permutation(n = self . length) -> Enumerator (12300.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.permutation.to_a......,1]]
a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permutation of length 0
a.permutation(4).to_a #=> [] : no permutations of......した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e} # => [1,2,3]
result # => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}
@see Array#combination, Array#repeated_permutation... -
Array
# permutation(n = self . length) { |p| block } -> self (12300.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.permutation.to_a......,1]]
a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permutation of length 0
a.permutation(4).to_a #=> [] : no permutations of......した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e} # => [1,2,3]
result # => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}
@see Array#combination, Array#repeated_permutation... -
Array
# repeated _ permutation(n) -> Enumerator (12300.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2]
a.repeated_permutation(1).to_......#=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).to_a #=> [[]] # one permutation of length 0
//}
ブロ......ロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}
@see Array#repeated_combination, Array#permutation... -
Array
# repeated _ permutation(n) { |p| . . . } -> self (12300.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2]
a.repeated_permutation(1).to_......#=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).to_a #=> [[]] # one permutation of length 0
//}
ブロ......ロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}
@see Array#repeated_combination, Array#permutation... -
Matrix
# permutation? -> bool (12300.0) -
行列が置換行列ならば true を返します。
...行列が置換行列ならば true を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します... -
Net
:: HTTPGenericRequest # request _ body _ permitted? -> bool (12300.0) -
リクエストにエンティティボディを一緒に送ることが許されている HTTP メソッド (POST など)の場合真を返します。
...場合真を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
post.request_body_permitted? # => true
head = Net::HTTP::Head.new(uri.request_uri)
head.request_body_permitted? # => false
//}... -
Net
:: HTTPGenericRequest # response _ body _ permitted? -> bool (12300.0) -
サーバからのレスポンスにエンティティボディを含むことが許されている HTTP メソッド (GET, POST など)の場合真を返します。
...合真を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
post.response_body_permitted? # => true
head = Net::HTTP::Head.new(uri.request_uri)
head.response_body_permitted? # => false
//}... -
Net
:: HTTPResponse . body _ permitted? -> bool (12300.0) -
エンティティボディを含むことが許されているレスポンスクラス ならば真を、そうでなければ偽を返します。
...エンティティボディを含むことが許されているレスポンスクラス
ならば真を、そうでなければ偽を返します。
//emlist[例][ruby]{
require 'net/http'
Net::HTTPSuccess.body_permitted? # => true
Net::HTTPNotModified.body_permitted? # => false
//}... -
OptionParser
# permute!(argv = self . default _ argv , into: nil) -> [String] (9412.0) -
与えられた argv を破壊的にパースします。argv からオプションがすべて取り除かれます。 オプションではないコマンドの引数(下の例で言うと somefile)があってもパースを中断しません。 argv を返します。
...オプションではないコマンドの引数(下の例で言うと somefile)があってもパースを中断しません。
argv を返します。
下の例で言うと、order と違いコマンドの引数 somefile よりも後ろにオプションを置くことが
できます。
@param......tionParser#onに渡されたブロックの値が格納されます。
キーの名前はロングオプションが定義されていればロングオプションの値を、
ショートオプションのみの場合はショートオプションの値から、先頭の "-......は OptionParser::ParseError のサブク
ラスになります。
//emlist[opt.rb][ruby]{
require 'optparse'
opt = OptionParser.new
opt.on('-a [VAL]') {|v| p :a }
opt.on('-b ') {|v| p :b }
opt.permute!(ARGV)
p ARGV
//}
↓
$ ruby opt.rb -a foo somefile -b
:a...