Method: Numeric#not_zero

Defined in:
lib/tdriver/util/common/numeric.rb

#not_zero(message = 'Given value must not be zero', exception = ArgumentError) ⇒ Object

TODO: document me



68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/tdriver/util/common/numeric.rb', line 68

def not_zero( message = 'Given value must not be zero', exception = ArgumentError )

  if zero?

    # replace macros
    message.gsub!( '$1', inspect )

    raise exception, message, caller

  end
    
  self

end