This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

filter!

        # Array.filter!

(from ruby core)
---
    filter!()

---

Calls the block, if given  with each element of `self`; removes from
`self` those elements for which the block returns `false` or `nil`.

Returns `self` if any elements were removed:
    a = [:foo, 'bar', 2, :bam]
    a.select! {|element| element.to_s.start_with?('b') } # => ["bar", :bam]

Returns `nil` if no elements were removed.

Returns a new Enumerator if no block given:
    a = [:foo, 'bar', 2, :bam]
    a.select! # => #<Enumerator: [:foo, "bar", 2, :bam]:select!>

Array#filter! is an alias for Array#select!.


(This method is an alias for Array#select!.)

Calls the block, if given  with each element of `self`; removes from
`self` those elements for which the block returns `false` or `nil`.

Returns `self` if any elements were removed:
    a = [:foo, 'bar', 2, :bam]
    a.select! {|element| element.to_s.start_with?('b') } # => ["bar", :bam]

Returns `nil` if no elements were removed.

Returns a new Enumerator if no block given:
    a = [:foo, 'bar', 2, :bam]
    a.select! # => #<Enumerator: [:foo, "bar", 2, :bam]:select!>

Array#filter! is an alias for Array#select!.



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.