Class: Potter::Collection

Inherits:
Array
  • Object
show all
Defined in:
lib/potter/collections.rb

Class Method Summary collapse

Class Method Details

.filter(name, block) ⇒ Object



3
4
5
6
7
# File 'lib/potter/collections.rb', line 3

def self.filter(name, block)
  define_method(name) do |*args|
    filter { _1.instance_exec(*args, &block) }
  end
end