Module: SecID::Generatable
- Included in:
- Base
- Defined in:
- lib/sec_id/concerns/generatable.rb
Overview
Note:
Generated identifiers are valid in format only — they are not real, registered securities. Country codes, prefixes, dates, and attributes are random.
Provides generation of new, format-valid identifiers for use as test fixtures.
Including classes define a class-level generate_body(random) returning a valid
body (the identifier without its check digit). The default ClassMethods#generate
builds an instance from that body and restores the check digit for check-digit types.
Types whose shape is not "body (+ check digit)" compose the full identifier in
generate_body (CFI, FISN) or override generate entirely (OCC).
Defined Under Namespace
Modules: ClassMethods