Exception: UnitedStates::State::PostalCode::StringTooShortError

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 shorter than 2 characters.

Constant Summary collapse

DEFAULT_MESSAGE =
'string too short, postal codes must be '\
'2 characters'.freeze

Instance Method Summary collapse

Constructor Details

#initialize(message = DEFAULT_MESSAGE) ⇒ StringTooShortError

Returns a new instance of StringTooShortError.



24
25
26
# File 'lib/united_states/state/postal_code.rb', line 24

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