Exception: UnitedStates::State::PostalCode::StringTooLongError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/united_states/state/postal_code.rb

Overview

Thrown when someone attempts to make a PostalCode instance from a string longer than 2 characters.

Constant Summary collapse

DEFAULT_MESSAGE =
'string too long, postal code must be '\
'2 characters'.freeze

Instance Method Summary collapse

Constructor Details

#initialize(message = DEFAULT_MESSAGE) ⇒ StringTooLongError

Returns a new instance of StringTooLongError.



13
14
15
# File 'lib/united_states/state/postal_code.rb', line 13

def initialize(message = DEFAULT_MESSAGE)
  super(message)
end