Class: ArelExtensions::Nodes::Variance
- Inherits:
-
AggregateFunction
- Object
- Arel::Nodes::Function
- Function
- AggregateFunction
- ArelExtensions::Nodes::Variance
- Defined in:
- lib/arel_extensions/nodes/std.rb
Constant Summary collapse
- RETURN_TYPE =
:number
Instance Attribute Summary collapse
-
#unbiased_estimator ⇒ Object
Returns the value of attribute unbiased_estimator.
Attributes inherited from AggregateFunction
Instance Method Summary collapse
-
#initialize(node, opts = {}) ⇒ Variance
constructor
A new instance of Variance.
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_estimator ⇒ Object
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 |