Class: Cash::Query::Calculation

Inherits:
Abstract
  • Object
show all
Defined in:
lib/cash/query/calculation.rb

Constant Summary

Constants inherited from Abstract

Abstract::DESC

Instance Method Summary collapse

Methods inherited from Abstract

#limit, #offset, #order, perform

Constructor Details

#initialize(active_record, operation, column, options1, options2) ⇒ Calculation

Returns a new instance of Calculation.



6
7
8
9
# File 'lib/cash/query/calculation.rb', line 6

def initialize(active_record, operation, column, options1, options2)
  super(active_record, options1, options2)
  @operation, @column = operation, column
end

Instance Method Details

#calculation?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/cash/query/calculation.rb', line 15

def calculation?
  true
end

#performObject



11
12
13
# File 'lib/cash/query/calculation.rb', line 11

def perform
  super({}, :raw => true)
end