別のキーワード
ライブラリ
クラス
- Array (33)
- Class (12)
- FalseClass (12)
- Integer (60)
- Method (24)
- Module (12)
-
Net
:: HTTP (24) - NilClass (12)
- Object (12)
- OptionParser (24)
- Pathname (24)
- Proc (30)
-
REXML
:: Text (36) - Set (12)
- String (24)
- Symbol (12)
- TrueClass (12)
-
URI
:: MailTo (36) - UnboundMethod (12)
モジュール
-
Net
:: HTTPHeader (12) - TSort (93)
キーワード
- [] (24)
- allbits? (8)
- anybits? (8)
- arity (24)
-
each
_ line (24) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - headers (12)
- initialize (12)
- intersection (12)
- lambda? (12)
- new (12)
- nobits? (8)
-
on
_ head (12) -
on
_ tail (12) - pack (21)
- parameters (24)
- post (24)
-
ruby2
_ keywords (18) -
set
_ form _ data (12) -
strongly
_ connected _ components (12) - sum (12)
-
to
_ mailtext (12) -
to
_ proc (12) -
to
_ rfc822text (12) -
to
_ s (12) - tsort (12)
-
tsort
_ each (23) - unpack (12)
- value (12)
- value= (12)
検索結果
先頭5件
-
TrueClass
# &(other) -> bool (21249.0) -
other が真なら true を, 偽なら false を返します。
...other が真なら true を, 偽なら false を返します。
@param other 論理積を行なう式です。
& は再定義可能な演算子に分類されていますので、通常は true & other のように使われます。
//emlist[例][ruby]{
p true & true #=> true
p true & false......#=> false
p true & nil #=> false
p true & (1 == 1) #=> true
p true & (1 + 1) #=> true
p true.&(true) #=> true
p true.&(false) #=> false
p true.&(nil) #=> false
p true.&(1 == 1) #=> true
p true.&(1 + 1) #=> true
//}... -
Integer
# &(other) -> Integer (21219.0) -
ビット二項演算子。論理積を計算します。
...ビット二項演算子。論理積を計算します。
@param other 数値
//emlist[][ruby]{
1 & 1 # => 1
2 & 3 # => 2
//}... -
Array
# &(other) -> Array (21213.0) -
集合の積演算です。両方の配列に含まれる要素からなる新しい配列を返 します。重複する要素は取り除かれます。
...における要素の順と同じです。
@param other 配列を指定します。
配列以外のオブジェクトを指定した場合は to_ary メソッドによ
る暗黙の型変換を試みます。
@raise TypeError 引数に配列以外の(暗黙の型変換が......行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
[1, 1, 2, 3] & [3, 1, 4] #=> [1, 3]
//}
@see Array#|......行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
[1, 1, 2, 3] & [3, 1, 4] #=> [1, 3]
//}
@see Array#|, Array#intersection... -
FalseClass
# &(other) -> false (18249.0) -
常に false を返します。
...。
@param other 論理積を行なう式です。
& は再定義可能な演算子に分類されていますので、通常は false & other の形で使われます。
//emlist[例][ruby]{
p false & true #=> false
p false & false #=> false
p false & nil #=> false
p false & (1 == 1)......#=> false
p false & (1 + 1) #=> false
p false.&(true) #=> false
p false.&(false) #=> false
p false.&(nil) #=> false
p false.&(1 == 1) #=> false
p false.&(1 + 1) #=> false
//}... -
NilClass
# &(other) -> false (18231.0) -
常に false を返します。
...常に false を返します。
@param other 論理積を行なう式です
//emlist[例][ruby]{
nil & true # => false
nil & false # => false
nil & nil # => false
nil & "a" # => false
//}... -
Module
# ruby2 _ keywords(method _ name , . . . ) -> nil (12244.0) -
For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.
...For the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword argument......ash argument is marked with a special
flag such that if it is the final element of a normal argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed through......other methods.
This should only be used for methods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby version... -
Proc
# ruby2 _ keywords -> proc (12244.0) -
Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.
...Marks the proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked......ormal argument splat to another method call, and that
method call does not include explicit keywords or a keyword splat, the
final element is interpreted as keywords. In other words, keywords will
be passed through the proc to other methods.
This should only be used for procs that delegate keyword......s to another
method, and only for backwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the proc responds to this method before calling
it... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) -> Enumerator (9213.0) -
node から到達可能な強連結成分についてのイテレータです。
...each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示する][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)......fetch(node).each(&block)
end
end
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
non_sort.each_strongly_connected_component{|nodes|
p nodes
nodes.each {|node|
non_sort.each_strongly_connected_component_from(node){|ns|
printf("%s -> %s\n", node, ns.join(","))
}
}
}
#出力......#=> [4]
#=> 4 -> 4
#=> [2, 3]
#=> 2 -> 4
#=> 2 -> 2,3
#=> 3 -> 4
#=> 3 -> 3,2
#=> [1]
#=> 1 -> 4
#=> 1 -> 2,3
#=> 1 -> 1
//}
@see TSort.each_strongly_connected_component_from... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) {|nodes| . . . } -> () (9213.0) -
node から到達可能な強連結成分についてのイテレータです。
...each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示する][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)......fetch(node).each(&block)
end
end
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
non_sort.each_strongly_connected_component{|nodes|
p nodes
nodes.each {|node|
non_sort.each_strongly_connected_component_from(node){|ns|
printf("%s -> %s\n", node, ns.join(","))
}
}
}
#出力......#=> [4]
#=> 4 -> 4
#=> [2, 3]
#=> 2 -> 4
#=> 2 -> 2,3
#=> 3 -> 4
#=> 3 -> 3,2
#=> [1]
#=> 1 -> 4
#=> 1 -> 2,3
#=> 1 -> 1
//}
@see TSort.each_strongly_connected_component_from...