ライブラリ
- ビルトイン (87)
- benchmark (5)
-
net
/ imap (4) - openssl (1)
- rss (90)
- shell (1)
-
shell
/ command-processor (1) -
shell
/ filter (1) - win32ole (4)
クラス
- Array (24)
-
Benchmark
:: Job (2) -
Benchmark
:: Report (3) - Dir (1)
-
Enumerator
:: Lazy (11) - File (1)
-
Net
:: IMAP (1) -
Net
:: IMAP :: MailboxACLItem (2) -
OpenSSL
:: ASN1 :: Constructive (1) -
RSS
:: ImageItemModel :: ImageItem (14) -
RSS
:: Maker :: ItemsBase :: ItemBase (5) -
RSS
:: Maker :: RSS20 :: Items :: Item :: Enclosure (6) -
RSS
:: Maker :: RSS20 :: Items :: Item :: Guid (2) -
RSS
:: Maker :: RSS20 :: Items :: Item :: Source (2) -
RSS
:: RDF :: Channel (2) -
RSS
:: RDF :: Channel :: Items (1) -
RSS
:: RDF :: Item (4) -
RSS
:: Rss :: Channel (3) -
RSS
:: Rss :: Channel :: Item (23) -
RSS
:: Rss :: Channel :: Item :: Category (4) -
RSS
:: Rss :: Channel :: Item :: Enclosure (6) -
RSS
:: Rss :: Channel :: Item :: Guid (1) -
RSS
:: Rss :: Channel :: Item :: Source (4) - Range (2)
- Shell (1)
-
Shell
:: CommandProcessor (1) -
Shell
:: Filter (1) - WIN32OLE (2)
-
WIN32OLE
_ VARIANT (1)
モジュール
- Enumerable (48)
-
RSS
:: ImageItemModel (2)
キーワード
- Category (1)
- Enclosure (3)
- EnclosureBase (1)
- Guid (1)
- ImageItem (1)
- ImageItemModel (1)
- Item (1)
- Items (1)
- MailboxACLItem (1)
- Source (1)
-
WIN32OLE
_ VARIANT (1) - [] (1)
- []= (1)
- about (1)
- about= (1)
- all? (2)
- any? (2)
- categories (1)
- category (1)
- category= (1)
- chunk (1)
- collect (5)
- collect! (2)
-
collect
_ concat (1) - comments (1)
- comments= (1)
- content (2)
- content= (2)
- count (3)
- date (2)
- date= (2)
- description (1)
- description= (1)
- detect (2)
- domain (1)
- domain= (1)
-
drop
_ while (1) - each (4)
-
each
_ with _ index (2) - enclosure (2)
- enclosure= (1)
- find (2)
-
find
_ all (3) -
find
_ index (2) -
flat
_ map (1) - getacl (1)
- grep (3)
-
grep
_ v (2) - guid (1)
- guid= (1)
- height (1)
- height= (1)
-
image
_ height (1) -
image
_ height= (1) -
image
_ item (1) -
image
_ item= (1) -
image
_ width (1) -
image
_ width= (1) - index (2)
- inject (3)
- isPermaLink (2)
- isPermaLink= (1)
- item= (1)
- items (2)
- items= (1)
- join (4)
-
keep
_ if (1) - length (2)
- length= (2)
- link (3)
- link= (3)
- list (1)
- map (5)
- map! (2)
-
max
_ by (4) -
min
_ by (4) - new (1)
- partition (2)
- pubDate (1)
- pubDate= (1)
-
rb
_ ary _ delete (1) -
rb
_ ary _ includes (1) -
rb
_ ary _ push (1) -
rb
_ ary _ unshift (1) - reduce (3)
- reject (3)
- report (2)
- resource (1)
- resource= (1)
- resources (1)
-
reverse
_ each (1) - rights (1)
- rindex (2)
-
ruby 1
. 8 . 2 feature (1) - select (5)
- select! (2)
-
sort
_ by (2) -
sort
_ by! (1) - source (1)
- source= (1)
- step (1)
-
take
_ while (2) - title (3)
- title= (3)
- type (2)
- type= (2)
- uniq (2)
- uniq! (2)
- url (4)
- url= (4)
- user (1)
- width (1)
- width= (1)
検索結果
先頭5件
-
RSS
:: Rss :: Channel # item (63307.0) -
@todo
@todo -
Benchmark
:: Job # item(label = "") { . . . } -> self (54604.0) -
与えられたラベルとブロックをジョブリストに登録します。
与えられたラベルとブロックをジョブリストに登録します。
@param label ラベル -
Benchmark
:: Report # item(label = "" , *fmt) { . . . } -> Benchmark :: Tms (54604.0) -
ラベルと与えられたブロックの実行時間を標準出力に出力します。
ラベルと与えられたブロックの実行時間を標準出力に出力します。
出力のフォーマットは Benchmark::Tms#format が行います。
@param label ラベル
@param fmt 結果に出力したいオブジェクト
@see Benchmark::Tms#format -
RSS
:: ImageItemModel # image _ item (36307.0) -
@todo
@todo -
RSS
:: ImageItemModel # image _ item= (36307.0) -
@todo
@todo -
RSS
:: Maker :: ItemsBase :: ItemBase # link (36301.0) -
@todo
@todo -
RSS
:: Maker :: ItemsBase :: ItemBase # link=() (36301.0) -
@todo
@todo -
RSS
:: Maker :: ItemsBase :: ItemBase # title (36301.0) -
@todo
@todo -
RSS
:: Maker :: ItemsBase :: ItemBase # title=() (36301.0) -
@todo
@todo -
RSS
:: Maker :: RSS20 :: Items :: Item :: Enclosure # length (36301.0) -
@todo
@todo -
RSS
:: Maker :: RSS20 :: Items :: Item :: Enclosure # length=() (36301.0) -
@todo
@todo -
RSS
:: Maker :: RSS20 :: Items :: Item :: Enclosure # url (36301.0) -
@todo
@todo -
RSS
:: Maker :: RSS20 :: Items :: Item :: Enclosure # url=() (36301.0) -
@todo
@todo -
RSS
:: Maker :: RSS20 :: Items :: Item :: Guid # isPermaLink (36301.0) -
@todo
@todo -
RSS
:: Maker :: RSS20 :: Items :: Item :: Guid # isPermaLink=() (36301.0) -
@todo
@todo -
RSS
:: Maker :: RSS20 :: Items :: Item :: Source # url (36301.0) -
@todo
@todo -
RSS
:: Maker :: RSS20 :: Items :: Item :: Source # url=() (36301.0) -
@todo
@todo -
Net
:: IMAP :: MailboxACLItem (36001.0) -
GETACL の応答の各要素を表すクラスです。
GETACL の応答の各要素を表すクラスです。
Net::IMAP#getacl の返り値として用いられます。
詳しくは 2086 を参照してください。 -
RSS
:: ImageItemModel (36001.0) -
-
RSS
:: ImageItemModel :: ImageItem (36001.0) -
-
RSS
:: Maker :: ItemsBase :: ItemBase :: EnclosureBase (36001.0) -
-
RSS
:: Maker :: RSS09 :: Items :: Item :: Enclosure (36001.0) -
-
RSS
:: Maker :: RSS20 :: Items :: Item :: Enclosure (36001.0) -
RSS 2.0を生成するときだけ利用されます.
RSS 2.0を生成するときだけ利用されます.
url,length,typeを設定する必要があります. -
Enumerable
# collect {|item| . . . } -> [object] (27607.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
各要素に対してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}
@see Array#collect, Array#map -
Enumerable
# collect -> Enumerator (27307.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
各要素に対してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}
@see Array#collect, Array#map -
RSS
:: Rss :: Channel # item= (27307.0) -
@todo
@todo -
RSS
:: Maker :: ItemsBase :: ItemBase # enclosure (27301.0) -
@todo
@todo -
RSS
:: RDF :: Channel # items (27301.0) -
@todo
@todo -
RSS
:: RDF :: Channel # items= (27301.0) -
@todo
@todo -
RSS
:: RDF :: Item # link (27301.0) -
@todo
@todo -
RSS
:: RDF :: Item # link= (27301.0) -
@todo
@todo -
RSS
:: RDF :: Item # title (27301.0) -
@todo
@todo -
RSS
:: RDF :: Item # title= (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel # items (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # enclosure (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # enclosure= (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # link (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # link= (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # title (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # title= (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item :: Enclosure # length (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item :: Enclosure # length= (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item :: Enclosure # url (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item :: Enclosure # url= (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item :: Guid # isPermaLink (27301.0) -
@todo
@todo
* http://purl.org/dc/elements/1.1/ -
RSS
:: Rss :: Channel :: Item :: Source # url (27301.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item :: Source # url= (27301.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # about (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # about= (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # date (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # date= (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # height (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # height= (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # image _ height (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # image _ height= (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # image _ width (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # image _ width= (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # resource (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # resource= (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # width (27001.0) -
@todo
@todo -
RSS
:: ImageItemModel :: ImageItem # width= (27001.0) -
@todo
@todo -
RSS
:: Maker :: RSS20 :: Items :: Item :: Enclosure # type (27001.0) -
@todo
@todo -
RSS
:: Maker :: RSS20 :: Items :: Item :: Enclosure # type=() (27001.0) -
@todo
@todo -
RSS
:: RDF :: Channel :: Items (27001.0) -
-
RSS
:: Rss :: Channel :: Item (27001.0) -
-
RSS
:: Rss :: Channel :: Item :: Enclosure (27001.0) -
-
VALUE rb
_ ary _ delete(VALUE ary , VALUE item) (19201.0) -
ary.delete
ary.delete -
VALUE rb
_ ary _ includes(ary , item) (18949.0) -
ary.include? item
ary.include? item -
Enumerator
:: Lazy # flat _ map {|item| . . . } -> Enumerator :: Lazy (18907.0) -
ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。
ブロックの実行結果をひとつに繋げたものに対してイテレートするような
Enumerator::Lazy のインスタンスを返します。
//emlist[][ruby]{
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
#=> ["f", "o", "o", "b", "a", "r"]
//}
ブロックの返した値 x は、以下の場合にのみ分解され、連結されます。
* x が配列であるか、to_ary メソッドを持つとき
* x が each および force メソッドを持つ (例:Enumerator::Lazy) ... -
Array
# collect {|item| . . . } -> [object] (18607.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
各要素に対してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にする
p [1, 2, 3].map {|n| n * 3 } # => [3, 6, 9]
//}
@see Enumerable#collect, Enumerable#map -
Array
# collect! {|item| . . } -> self (18607.0) -
各要素を順番にブロックに渡して評価し、その結果で要素を 置き換えます。
各要素を順番にブロックに渡して評価し、その結果で要素を
置き換えます。
ブロックが与えられなかった場合は、自身と map! から生成した
Enumerator オブジェクトを返します。
//emlist[例][ruby]{
ary = [1, 2, 3]
ary.map! {|i| i * 3 }
p ary #=> [3, 6, 9]
ary = [1, 2, 3]
e = ary.map!
e.each{ 1 }
p ary #=> [1, 1, 1]
//}
@see Array#collect, Enumerator -
Enumerable
# find _ all {|item| . . . } -> [object] (18607.0) -
各要素に対してブロックを評価した値が真であった要素を全て含む配列を 返します。真になる要素がひとつもなかった場合は空の配列を返します。
各要素に対してブロックを評価した値が真であった要素を全て含む配列を
返します。真になる要素がひとつもなかった場合は空の配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
(1..10).find_all # => #<Enumerator: 1..10:find_all>
(1..10).find_all { |i| i % 3 == 0 } # => [3, 6, 9]
[1,2,3,4,5].select # => #<E... -
Enumerable
# select {|item| . . . } -> [object] (18607.0) -
各要素に対してブロックを評価した値が真であった要素を全て含む配列を 返します。真になる要素がひとつもなかった場合は空の配列を返します。
各要素に対してブロックを評価した値が真であった要素を全て含む配列を
返します。真になる要素がひとつもなかった場合は空の配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
(1..10).find_all # => #<Enumerator: 1..10:find_all>
(1..10).find_all { |i| i % 3 == 0 } # => [3, 6, 9]
[1,2,3,4,5].select # => #<E... -
Enumerator
:: Lazy # collect {|item| . . . } -> Enumerator :: Lazy (18607.0) -
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.map{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:map>
1.step.lazy.collect{ |n| n.succ }.take(10).force
# => [2, 3, 4, 5, 6, 7, 8,... -
Enumerator
:: Lazy # collect _ concat {|item| . . . } -> Enumerator :: Lazy (18607.0) -
ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。
ブロックの実行結果をひとつに繋げたものに対してイテレートするような
Enumerator::Lazy のインスタンスを返します。
//emlist[][ruby]{
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
#=> ["f", "o", "o", "b", "a", "r"]
//}
ブロックの返した値 x は、以下の場合にのみ分解され、連結されます。
* x が配列であるか、to_ary メソッドを持つとき
* x が each および force メソッドを持つ (例:Enumerator::Lazy) ... -
Enumerator
:: Lazy # find _ all {|item| . . . } -> Enumerator :: Lazy (18607.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i| i.even? }.take(10).force
# => [2, 4, 6,... -
Enumerator
:: Lazy # select {|item| . . . } -> Enumerator :: Lazy (18607.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i| i.even? }.take(10).force
# => [2, 4, 6,... -
Array
# select {|item| . . . } -> [object] (18604.0) -
各要素に対してブロックを評価した値が真であった要素を全て含む配列を 返します。真になる要素がひとつもなかった場合は空の配列を返します。
各要素に対してブロックを評価した値が真であった要素を全て含む配列を
返します。真になる要素がひとつもなかった場合は空の配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[1,2,3,4,5].select # => #<Enumerator: [1, 2, 3, 4, 5]:select>
[1,2,3,4,5].select { |num| num.even? } # => [2, 4]
//}
@see Enumerable#select
@see Array#select... -
Array
# select! {|item| block } -> self | nil (18604.0) -
ブロックが真を返した要素を残し、偽を返した要素を自身から削除します。 変更があった場合は self を、 変更がなかった場合には nil を返します。
ブロックが真を返した要素を残し、偽を返した要素を自身から削除します。
変更があった場合は self を、
変更がなかった場合には nil を返します。
//emlist[例][ruby]{
a = %w{ a b c d e f }
a.select! {|v| v =~ /[a-z]/ } # => nil
a # => ["a", "b", "c", "d", "e", "f"]
//}
ブロックが与えられなかった場合は、自身と select! から生成した
Enumerator オブジェクトを返します。
@see Array#keep_if, Array#reject! -
Enumerable
# all? {|item| . . . } -> bool (18604.0) -
すべての要素が真である場合に true を返します。 偽である要素があれば、ただちに false を返します。
すべての要素が真である場合に true を返します。
偽である要素があれば、ただちに false を返します。
ブロックを伴う場合は、各要素に対してブロックを評価し、すべての結果
が真である場合に true を返します。ブロックが偽を返した時点で、
ただちに false を返します。
自身に要素が存在しない場合は true を返します。
//emlist[例][ruby]{
require 'set'
# すべて正の数か?
p Set[5, 6, 7].all? {|v| v > 0 } # => true
p Set[5, -1, 7].all? {|v| v > 0... -
Enumerator
:: Lazy # drop _ while {|item| . . . } -> Enumerator :: Lazy (18604.0) -
Enumerable#drop_while と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#drop_while と同じですが、配列ではなくEnumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.drop_while { |i| i < 42 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:drop_while>
1.step.lazy.drop_while { |i| i < 42 }.take(10).force
# => [42, 43, 44, 45, 46, 47, 48, 49, 50, 51]
//... -
Enumerator
:: Lazy # take _ while {|item| . . . } -> Enumerator :: Lazy (18604.0) -
Enumerable#take_while と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#take_while と同じですが、配列ではなくEnumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle).take_while { |e| e.first < 100_000 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<Enumerator: "a".."z":cycle>)>:take_while>
1.step.lazy.... -
Net
:: IMAP # getacl(mailbox) -> [Net :: IMAP :: MailboxACLItem] (18601.0) -
GETACL コマンドを送り、メールボックスの ACL(Access Control List) を取得します。
GETACL コマンドを送り、メールボックスの
ACL(Access Control List) を取得します。
Net::IMAP#getacl で指定したメールボックスに
対し何らかの権限を持つ各ユーザに対して
Net::IMAP::MailboxACLItem オブジェクトが
作られ、その配列が返されます。
GETACL コマンドは 2086 で定義されています。
詳しくはそちらを参照してください。
@param mailbox メールボックス名(文字列)
@see Net::IMAP::MailboxACLItem -
Benchmark
:: Report # list -> [Benchmark :: Tms] (18367.0) -
Benchmark::Report#item 実行時に作成された Benchmark::Tms オ ブジェクトの一覧を返します。
Benchmark::Report#item 実行時に作成された Benchmark::Tms オ
ブジェクトの一覧を返します。
@see Benchmark::Report#item -
Array
# collect -> Enumerator (18307.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
各要素に対してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にする
p [1, 2, 3].map {|n| n * 3 } # => [3, 6, 9]
//}
@see Enumerable#collect, Enumerable#map -
Array
# collect! -> Enumerator (18307.0) -
各要素を順番にブロックに渡して評価し、その結果で要素を 置き換えます。
各要素を順番にブロックに渡して評価し、その結果で要素を
置き換えます。
ブロックが与えられなかった場合は、自身と map! から生成した
Enumerator オブジェクトを返します。
//emlist[例][ruby]{
ary = [1, 2, 3]
ary.map! {|i| i * 3 }
p ary #=> [3, 6, 9]
ary = [1, 2, 3]
e = ary.map!
e.each{ 1 }
p ary #=> [1, 1, 1]
//}
@see Array#collect, Enumerator -
Enumerable
# find _ all -> Enumerator (18307.0) -
各要素に対してブロックを評価した値が真であった要素を全て含む配列を 返します。真になる要素がひとつもなかった場合は空の配列を返します。
各要素に対してブロックを評価した値が真であった要素を全て含む配列を
返します。真になる要素がひとつもなかった場合は空の配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
(1..10).find_all # => #<Enumerator: 1..10:find_all>
(1..10).find_all { |i| i % 3 == 0 } # => [3, 6, 9]
[1,2,3,4,5].select # => #<E... -
Enumerable
# map {|item| . . . } -> [object] (18307.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
各要素に対してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}
@see Array#collect, Array#map -
Enumerable
# select -> Enumerator (18307.0) -
各要素に対してブロックを評価した値が真であった要素を全て含む配列を 返します。真になる要素がひとつもなかった場合は空の配列を返します。
各要素に対してブロックを評価した値が真であった要素を全て含む配列を
返します。真になる要素がひとつもなかった場合は空の配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
(1..10).find_all # => #<Enumerator: 1..10:find_all>
(1..10).find_all { |i| i % 3 == 0 } # => [3, 6, 9]
[1,2,3,4,5].select # => #<E... -
Array
# select -> Enumerator (18304.0) -
各要素に対してブロックを評価した値が真であった要素を全て含む配列を 返します。真になる要素がひとつもなかった場合は空の配列を返します。
各要素に対してブロックを評価した値が真であった要素を全て含む配列を
返します。真になる要素がひとつもなかった場合は空の配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[1,2,3,4,5].select # => #<Enumerator: [1, 2, 3, 4, 5]:select>
[1,2,3,4,5].select { |num| num.even? } # => [2, 4]
//}
@see Enumerable#select
@see Array#select... -
Array
# select! -> Enumerator (18304.0) -
ブロックが真を返した要素を残し、偽を返した要素を自身から削除します。 変更があった場合は self を、 変更がなかった場合には nil を返します。
ブロックが真を返した要素を残し、偽を返した要素を自身から削除します。
変更があった場合は self を、
変更がなかった場合には nil を返します。
//emlist[例][ruby]{
a = %w{ a b c d e f }
a.select! {|v| v =~ /[a-z]/ } # => nil
a # => ["a", "b", "c", "d", "e", "f"]
//}
ブロックが与えられなかった場合は、自身と select! から生成した
Enumerator オブジェクトを返します。
@see Array#keep_if, Array#reject! -
Enumerable
# all? -> bool (18304.0) -
すべての要素が真である場合に true を返します。 偽である要素があれば、ただちに false を返します。
すべての要素が真である場合に true を返します。
偽である要素があれば、ただちに false を返します。
ブロックを伴う場合は、各要素に対してブロックを評価し、すべての結果
が真である場合に true を返します。ブロックが偽を返した時点で、
ただちに false を返します。
自身に要素が存在しない場合は true を返します。
//emlist[例][ruby]{
require 'set'
# すべて正の数か?
p Set[5, 6, 7].all? {|v| v > 0 } # => true
p Set[5, -1, 7].all? {|v| v > 0... -
Enumerator
:: Lazy # take _ while -> Enumerator :: Lazy (18304.0) -
Enumerable#take_while と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#take_while と同じですが、配列ではなくEnumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle).take_while { |e| e.first < 100_000 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<Enumerator: "a".."z":cycle>)>:take_while>
1.step.lazy.... -
WIN32OLE
_ VARIANT (18055.0) -
OLEオートメーションの標準型のVARIANTオブジェクトをRubyで利用するための クラスです。
OLEオートメーションの標準型のVARIANTオブジェクトをRubyで利用するための
クラスです。
VARIANT型とは、型情報と値のペアから構成されるデータ型で、元はVBの型無し
変数のための構造体です。OLEオートメーションのメソッド呼び出しには汎用型
として引数にはVARIANT型を利用します。
* 型情報は、WIN32OLE_VARIANT#vartypeで取得できます。
* 値は、WIN32OLE_VARIANT#valueで取得できます。
OLEオートメーションのメソッド呼び出し規約では、引数はVARIANT型の配列と
して定義されています。
この規約に対して、WIN3... -
Enumerable
# map -> Enumerator (18007.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
各要素に対してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}
@see Array#collect, Array#map -
Net
:: IMAP :: MailboxACLItem # rights -> String (18001.0) -
アクセス権限を文字列で返します。
アクセス権限を文字列で返します。
Net::IMAP::MailboxACLItem#user で得られるユーザが
持っている権限が返されます。
この文字列の意味については 2086 を参照してください。 -
Net
:: IMAP :: MailboxACLItem # user -> String (18001.0) -
ユーザ名を返します。
ユーザ名を返します。
このユーザは
Net::IMAP#getacl で指定したメールボックスに
対し何らかの権限を持っています。 -
RSS
:: RDF :: Channel :: Items # resources (18001.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # author (18001.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # author= (18001.0) -
@todo
@todo