class

CrystalIBAN::StructureRegistry

Inherits Reference < Object

Parses and holds the country IBAN pattern data. Can be shared between a Generator and Validator to avoid parsing JSON twice.

Constants

BUNDLED_JSON = {{ read_file("/tmp/tmp.ELMalG/src/src/../data/iban_structure.json") }}

Constructors

new

Loads the bundled 49-country IBAN structures compiled into the binary.

Source
new(*, json : String)

Loads IBAN structures from a custom JSON string in the same format as iban_structure.json. Use this to extend or override the default country set.

Source

Instance methods

structures
Source