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.
42 43 44 |
# File 'lib/moving_window.rb', line 42 def initialize(*args) @instance, @arel, @column = args end |
Instance Attribute Details
#negate=(value) ⇒ Object (writeonly)
Sets the attribute negate
40 41 42 |
# File 'lib/moving_window.rb', line 40 def negate=(value) @negate = value end |
Instance Method Details
#call ⇒ Object
46 47 48 |
# File 'lib/moving_window.rb', line 46 def call @instance.filter(@arel, :column => @column, :negate => @negate) end |
#not ⇒ Object
50 51 52 53 54 |
# File 'lib/moving_window.rb', line 50 def not clone = self.clone clone.negate = !@negate clone end |