Class: MovingWindow::Proc
- Inherits:
-
Proc
- Object
- Proc
- MovingWindow::Proc
- Defined in:
- lib/moving_window.rb
Instance Attribute Summary collapse
-
#negate ⇒ Object
writeonly
Sets the attribute negate.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(*args) ⇒ Proc
constructor
A new instance of Proc.
- #not ⇒ Object
Constructor Details
#initialize(*args) ⇒ Proc
Returns a new instance of Proc.
37 38 39 |
# File 'lib/moving_window.rb', line 37 def initialize(*args) @instance, @arel, @column = args end |
Instance Attribute Details
#negate=(value) ⇒ Object (writeonly)
Sets the attribute negate
35 36 37 |
# File 'lib/moving_window.rb', line 35 def negate=(value) @negate = value end |
Instance Method Details
#call ⇒ Object
41 42 43 |
# File 'lib/moving_window.rb', line 41 def call @instance.filter(@arel, :column => @column, :negate => @negate) end |
#not ⇒ Object
45 46 47 48 49 |
# File 'lib/moving_window.rb', line 45 def not clone = self.clone clone.negate = !@negate clone end |