Class: PfrpgCore::MathHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/pfrpg_core/math_helper.rb

Class Method Summary collapse

Class Method Details

.is_number(s) ⇒ Object



2
3
4
# File 'lib/pfrpg_core/math_helper.rb', line 2

def self.is_number(s)
  s.to_s.match(/\A[+-]?\d+?(\.\d+)?\Z/) == nil ? false : true
end