Sha256: 84570316a30d8e928adf74a4553df4bebe92fa3b309b93789475270eff3c7370
Contents?: true
Size: 696 Bytes
Versions: 5
Compression:
Stored size: 696 Bytes
Contents
module WireClient module AccountTransactionHelpers def country_subdivision_abbr return US_STATES[@country_subdivision] if a_full_name_us_state? @country_subdivision end def country_subdivision_name return US_STATES.key(@country_subdivision) if an_abbreviated_us_state? @country_subdivision end protected def within_the_us? @country == 'US' end def an_abrreviated_state_name? @country_subdivision.match(/\A[A-Z]{2,2}\z/) end def an_abbreviated_us_state? within_the_us? && an_abrreviated_state_name? end def a_full_name_us_state? within_the_us? && !an_abrreviated_state_name? end end end
Version data entries
5 entries across 5 versions & 1 rubygems