Class: ArelExtensions::Nodes::Variance

Inherits:
Function
  • Object
show all
Defined in:
lib/arel_extensions/nodes/std.rb

Constant Summary collapse

RETURN_TYPE =
:number

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Function

#as, #convert_to_date_node, #convert_to_datetime_node, #convert_to_node, #convert_to_number, #convert_to_string_node, #expr, #left, #return_type, #right, #type_of_attribute

Methods included from Predications

#cast, #convert_to_node, #imatches, #in, #matches, #not_in, #when

Constructor Details

#initialize(expr) ⇒ Variance

Returns a new instance of Variance.



18
19
20
21
22
# File 'lib/arel_extensions/nodes/std.rb', line 18

def initialize expr
    col = expr.first
       @unbiased_estimator = expr[1]
   	super [col]
end

Instance Attribute Details

#unbiased_estimatorObject

Returns the value of attribute unbiased_estimator.



17
18
19
# File 'lib/arel_extensions/nodes/std.rb', line 17

def unbiased_estimator
  @unbiased_estimator
end