Module: NumericCheckExt
- Included in:
- GeoDistance
- Defined in:
- lib/geo_vectors/util/geo_distance.rb
Instance Method Summary collapse
- #check_numeric!(arg) ⇒ Object
- #is_numeric?(arg) ⇒ Boolean (also: #is_num?)
Instance Method Details
#check_numeric!(arg) ⇒ Object
11 12 13 |
# File 'lib/geo_vectors/util/geo_distance.rb', line 11 def check_numeric! arg raise ArgumentError, "Argument must be Numeric" if !is_numeric? arg end |
#is_numeric?(arg) ⇒ Boolean Also known as: is_num?
5 6 7 |
# File 'lib/geo_vectors/util/geo_distance.rb', line 5 def is_numeric? arg arg.is_a? Numeric end |