Skip to contents

BaseProvider

BaseProvider

Note

You cannot instantiate the Parent providers. You must use one of the localized one.

Super class

charlatan::BareProvider -> BaseProvider

Active bindings

locale

(character) locale of this Provider.

Methods

Inherited methods


Method check_locale()

check a locale to see if it exists, if not, stop with error message

Usage

BaseProvider$check_locale(x)

Arguments

x

a locale name, e.g, 'bg_BG'

Returns

returns nothing if locale is supported; stops w/ message if not


Method allowed_locales()

fetch the allowed locales for this provider

Usage

BaseProvider$allowed_locales()


Method new()

Create a new Provider object

Usage

Returns

A new object


Method print()

Print method for provider

Usage

BaseProvider$print(...)

Arguments

...

ignored by this method


Method clone()

The objects of this class are cloneable with this method.

Usage

BaseProvider$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

(x <- BaseProvider$new())
#> < BaseProvider >
#> locale: 

x$numerify("#%%asdf221?")
#> [1] "775asdf221?"
x$lexify("#%%asdf221?")
#> [1] "#%%asdf221h"
x$bothify("#%%asdf221?")
#> [1] "173asdf221E"