Class: ArelExtensions::Nodes::Variance

Inherits:
AggregateFunction show all
Defined in:
lib/arel_extensions/nodes/std.rb

Constant Summary collapse

RETURN_TYPE =
:number

Constants inherited from Function

Function::MBSTRING

Instance Attribute Summary collapse

Attributes inherited from AggregateFunction

#group, #order

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(node, **opts) ⇒ Variance

Returns a new instance of Variance.



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

def initialize node, **opts
  @unbiased_estimator = opts[:unbiased] ? true : false
  super node, **opts
end

Instance Attribute Details

#unbiased_estimatorObject

Returns the value of attribute unbiased_estimator.



15
16
17
# File 'lib/arel_extensions/nodes/std.rb', line 15

def unbiased_estimator
  @unbiased_estimator
end