PATH:
opt
/
alt
/
ruby18
/
share
/
ri
/
1.8
/
system
/
Enumerable
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Returns an array of every element in <em>enum</em> for which <tt>Pattern === element</tt>. If the optional <em>block</em> is supplied, each matching element is passed to it, and the block's result is stored in the output array. - !ruby/struct:SM::Flow::VERB body: " (1..100).grep 38..44 #=> [38, 39, 40, 41, 42, 43, 44]\n c = IO.constants\n c.grep(/SEEK/) #=> ["SEEK_END", "SEEK_SET", "SEEK_CUR"]\n res = c.grep(/SEEK/) {|v| IO.const_get(v) }\n res #=> [2, 0, 1]\n" full_name: Enumerable#grep is_singleton: false name: grep params: | enum.grep(pattern) => array enum.grep(pattern) {| obj | block } => array visibility: public
[-] any%3f-i.yaml
[edit]
[-] reject-i.yaml
[edit]
[-] minmax-i.yaml
[edit]
[-] drop-i.yaml
[edit]
[-] drop_while-i.yaml
[edit]
[-] min-i.yaml
[edit]
[+]
Enumerator
[-] cdesc-Enumerable.yaml
[edit]
[-] one%3f-i.yaml
[edit]
[-] partition-i.yaml
[edit]
[-] enum_slice-i.yaml
[edit]
[-] to_set-i.yaml
[edit]
[-] enum_cons-i.yaml
[edit]
[-] inject-i.yaml
[edit]
[-] find-i.yaml
[edit]
[-] sort_by-i.yaml
[edit]
[-] find_index-i.yaml
[edit]
[-] none%3f-i.yaml
[edit]
[-] group_by-i.yaml
[edit]
[-] enum_with_index-i.yaml
[edit]
[-] take-i.yaml
[edit]
[-] include%3f-i.yaml
[edit]
[-] cycle-i.yaml
[edit]
[-] min_by-i.yaml
[edit]
[-] all%3f-i.yaml
[edit]
[-] reverse_each-i.yaml
[edit]
[-] each_cons-i.yaml
[edit]
[-] grep-i.yaml
[edit]
[-] each_slice-i.yaml
[edit]
[-] map-i.yaml
[edit]
[-] member%3f-i.yaml
[edit]
[-] max-i.yaml
[edit]
[-] entries-i.yaml
[edit]
[-] to_a-i.yaml
[edit]
[-] take_while-i.yaml
[edit]
[-] collect-i.yaml
[edit]
[+]
..
[-] find_all-i.yaml
[edit]
[-] select-i.yaml
[edit]
[-] sort-i.yaml
[edit]
[-] count-i.yaml
[edit]
[-] max_by-i.yaml
[edit]
[-] minmax_by-i.yaml
[edit]
[-] each_with_index-i.yaml
[edit]
[-] detect-i.yaml
[edit]
[-] first-i.yaml
[edit]
[-] zip-i.yaml
[edit]
[-] reduce-i.yaml
[edit]