Class: Arrest::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/arrest/helper/filter.rb

Overview

A filter is a named predicate to limit a collection to a subset with certain features

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, block = nil) ⇒ Filter

Returns a new instance of Filter.



8
9
10
11
# File 'lib/arrest/helper/filter.rb', line 8

def initialize name, block = nil
  @name = name
  @block = block
end

Instance Attribute Details

#blockObject

Returns the value of attribute block.



6
7
8
# File 'lib/arrest/helper/filter.rb', line 6

def block
  @block
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/arrest/helper/filter.rb', line 5

def name
  @name
end