Class: Integer

Inherits:
Object show all
Defined in:
lib/mongo_doc/ext/numeric.rb

Class Method Summary collapse

Class Method Details

.cast_from_string(string) ⇒ Object



14
15
16
# File 'lib/mongo_doc/ext/numeric.rb', line 14

def self.cast_from_string(string)
  string.to_i unless string.blank?
end