Class: Faker::SouthAfrica
- Defined in:
- lib/faker/default/south_africa.rb
Constant Summary
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.cell_phone ⇒ String
Produces a South African cell phone number.
-
.close_corporation_registration_number ⇒ String
Produces a South African close corporation registration number.
-
.id_number ⇒ String
Produces a South African ID number.
-
.invalid_id_number ⇒ String
Produces an invalid South African ID number.
-
.listed_company_registration_number ⇒ String
Produces a South African listed company registration number.
-
.phone_number ⇒ String
Produces a South African phone number.
-
.pty_ltd_registration_number ⇒ String
Produces a South African private company registration number.
-
.trust_registration_number ⇒ String
Produces a South African trust registration number.
-
.valid_id_number ⇒ String
Produces a valid South African ID number.
-
.vat_number ⇒ String
Produces a South African VAT number.
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, shuffle!, translate, unique, with_locale
Class Method Details
.cell_phone ⇒ String
Produces a South African cell phone number.
69 70 71 72 73 |
# File 'lib/faker/default/south_africa.rb', line 69 def cell_phone with_locale 'en-ZA' do Faker::PhoneNumber.cell_phone end end |
.close_corporation_registration_number ⇒ String
Produces a South African close corporation registration number.
97 98 99 |
# File 'lib/faker/default/south_africa.rb', line 97 def close_corporation_registration_number Faker::Company.south_african_close_corporation_registration_number end |
.id_number ⇒ String
Produces a South African ID number.
15 16 17 |
# File 'lib/faker/default/south_africa.rb', line 15 def id_number Faker::IdNumber.south_african_id_number end |
.invalid_id_number ⇒ String
Produces an invalid South African ID number
41 42 43 |
# File 'lib/faker/default/south_africa.rb', line 41 def invalid_id_number Faker::IdNumber.invalid_south_african_id_number end |
.listed_company_registration_number ⇒ String
Produces a South African listed company registration number.
110 111 112 |
# File 'lib/faker/default/south_africa.rb', line 110 def listed_company_registration_number Faker::Company.south_african_listed_company_registration_number end |
.phone_number ⇒ String
Produces a South African phone number.
54 55 56 57 58 |
# File 'lib/faker/default/south_africa.rb', line 54 def phone_number with_locale 'en-ZA' do Faker::PhoneNumber.phone_number end end |
.pty_ltd_registration_number ⇒ String
Produces a South African private company registration number.
84 85 86 |
# File 'lib/faker/default/south_africa.rb', line 84 def pty_ltd_registration_number Faker::Company.south_african_pty_ltd_registration_number end |
.trust_registration_number ⇒ String
Produces a South African trust registration number.
123 124 125 |
# File 'lib/faker/default/south_africa.rb', line 123 def trust_registration_number Faker::Company.south_african_trust_registration_number end |
.valid_id_number ⇒ String
Produces a valid South African ID number
28 29 30 |
# File 'lib/faker/default/south_africa.rb', line 28 def valid_id_number Faker::IdNumber.valid_south_african_id_number end |
.vat_number ⇒ String
Produces a South African VAT number.
136 137 138 |
# File 'lib/faker/default/south_africa.rb', line 136 def vat_number Faker::Finance.vat_number(country: 'ZA') end |