Exception: Phony::SplittingError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/phony.rb

Overview

Raised in case Phony can’t split a given number.

Examples:

Phony.split("Fnork!") # Raises a Phony::SplittingError.

Instance Method Summary collapse

Constructor Details

#initialize(number) ⇒ SplittingError

Returns a new instance of SplittingError.



95
96
97
# File 'lib/phony.rb', line 95

def initialize(number)
  super(%(Phony could not split the given number. Is #{(number.nil? || number == '') ? 'it' : number.inspect} a phone number?))
end