Class: Arel::Attributes::Decimal

Inherits:
Arel::Attribute show all
Defined in:
lib/arel/algebra/attributes/decimal.rb

Constant Summary

Constants inherited from Arel::Attribute

Arel::Attribute::PREDICATES, Arel::Attribute::Predications

Instance Attribute Summary

Attributes inherited from Arel::Attribute

#alias, #ancestor, #hash, #history, #name, #relation

Instance Method Summary collapse

Methods inherited from Arel::Attribute

#/, #==, #aggregation?, #as, #bind, #christener, #column, #descends_from?, #engine, #eq, #eq_all, #eq_any, #eval, #find_correlate_in, #format, #gt, #gt_all, #gt_any, #gteq, #gteq_all, #gteq_any, #in, #in_all, #in_any, #initialize, #join?, #lt, #lt_all, #lt_any, #lteq, #lteq_all, #lteq_any, #matches, #matches_all, #matches_any, #named?, #not_eq, #not_eq_all, #not_eq_any, #not_in, #not_in_all, #not_in_any, #not_matches, #not_matches_all, #not_matches_any, #original_attribute, #original_relation, #root, #to_attribute, #to_sql

Methods included from Arel::Attribute::Types

#type_cast_to_numeric, #typecast_error

Methods included from Arel::Attribute::Orderings

#asc, #desc

Methods included from Arel::Attribute::Expressions

#average, #count, #maximum, #minimum, #sum

Constructor Details

This class inherits a constructor from Arel::Attribute

Instance Method Details

#type_cast(val) ⇒ Object



4
5
6
# File 'lib/arel/algebra/attributes/decimal.rb', line 4

def type_cast(val)
  type_cast_to_numeric(val, :to_d)
end