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.


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

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