File: //usr/share/ri/3.0.0/system/Hash/keep_if-i.ri
U:RDoc::AnyMethod[iI"keep_if:ETI"Hash#keep_if;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I".Calls the block for each key-value pair; ;TI"<retains the entry if the block returns a truthy value; ;TI"1otherwise deletes the entry; returns +self+.;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2}
;TI"Mh.keep_if { |key, value| key.start_with?('b') } # => {:bar=>1, :baz=>2}
;T:@format0o;
; [I"1Returns a new \Enumerator if no block given:;To;; [I""h = {foo: 0, bar: 1, baz: 2}
;TI"Ke = h.keep_if # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:keep_if>
;TI"Ie.each { |key, value| key.start_with?('b') } # => {:bar=>1, :baz=>2};T;0:
@fileI"hash.c;T:0@omit_headings_from_table_of_contents_below0I"Mhash.keep_if {|key, value| ... } -> self
hash.keep_if -> new_enumerator
;T0[ I"();T@FI" Hash;TcRDoc::NormalClass00