Class: CollectionFilter::Open

Inherits:
Base
  • Object
show all
Defined in:
lib/collection_filter/open.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

filter_implementation_for, filter_implementations, find_filter

Class Method Details

.can_filter?(object, block) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/collection_filter/open.rb', line 3

def self.can_filter?(object, block)
  block.call(object)
end

Instance Method Details

#add(object, collection) ⇒ Object



7
8
9
# File 'lib/collection_filter/open.rb', line 7

def add(object, collection)
  collection << object
end