module SQLite3ExtendFunction::Functions::Mod
Public Class Methods
call(y, x = nil)
click to toggle source
@param [Integer, Float] y @param [Integer, Float] x @return [Integer] @raise [SQLite3::SQLException]
# File lib/sqlite3_extend_function/functions/mod.rb, line 12 def call(y, x = nil) Float(y).modulo(Float(x)).to_i rescue ArgumentError raise SQLite3::SQLException, 'Could not choose a best candidate function. You might need to add explicit type casts.' end