Method: Mongify::Database::Column#scale

Defined in:
lib/mongify/database/column.rb

#scaleinteger

Get the scale option for decimal to integer conversion

column 'total', :decimal, :as => 'integer', :scale => 3

Returns:

  • (integer)

    passed option or 0



220
221
222
# File 'lib/mongify/database/column.rb', line 220

def scale
  options['scale'] ||= 0
end