class FakerService: Any
Fields
Name | Description |
---|---|
val numerify: ()->String
|
Replaces every |
val letterify: (Boolean?)->String
|
Replaces every |
val regexify: ()->String
|
Returns a random string generated from this String receiver pattern. |
Methods
load
fun load(category: YamlCategory, secondaryCategory: Category?): Dictionary
Reads values of the default 'en' locale files into this dictionary.
Additionally, if (locale != null && locale.isValid)
, reads the contents of the specified locale file
into this dictionary (Will overwrite all matching keys with values from specified locale file.)
Parameters
Name | Description |
---|---|
category: YamlCategory
|
|
secondaryCategory: Category?
|
ReturnValue
Name | Description |
---|---|
Dictionary
|
getRawValue
fun getRawValue(category: YamlCategory, vararg keys: String): RawExpression
Parameters
Name | Description |
---|---|
category: YamlCategory
|
|
vararg keys: String
|
ReturnValue
Name | Description |
---|---|
RawExpression
|
getRawValue
fun getRawValue(category: YamlCategory, key: String): RawExpression
Returns raw value as RawExpression from a given category fetched by its key
Parameters
Name | Description |
---|---|
category: YamlCategory
|
|
key: String
|
ReturnValue
Name | Description |
---|---|
RawExpression
|
getRawValue
fun getRawValue(category: YamlCategory, key: String, secondaryKey: String): RawExpression
Returns raw value as RawExpression from a given category fetched by its key and secondaryKey
Parameters
Name | Description |
---|---|
category: YamlCategory
|
|
key: String
|
|
secondaryKey: String
|
ReturnValue
Name | Description |
---|---|
RawExpression
|
getRawValue
fun getRawValue(category: YamlCategory, key: String, secondaryKey: String, thirdKey: String): RawExpression
Returns raw value as RawExpression for a given category fetched from the dictionary by its key, secondaryKey, and thirdKey.
Parameters
Name | Description |
---|---|
category: YamlCategory
|
|
key: String
|
|
secondaryKey: String
|
|
thirdKey: String
|
ReturnValue
Name | Description |
---|---|
RawExpression
|
resolve
fun resolve(category: YamlCategory, key: String): String
Resolves RawExpression value of the key in this category.
Parameters
Name | Description |
---|---|
category: YamlCategory
|
|
key: String
|
ReturnValue
Name | Description |
---|---|
String
|
resolve
fun resolve(category: YamlCategory, key: String, secondaryKey: String): String
Resolves RawExpression value of the key and secondaryKey in this category.
Parameters
Name | Description |
---|---|
category: YamlCategory
|
|
key: String
|
|
secondaryKey: String
|
ReturnValue
Name | Description |
---|---|
String
|
resolve
fun resolve(category: YamlCategory, key: String, secondaryKey: String, thirdKey: String): String
Resolves RawExpression value of the key, secondaryKey, and thirdKey in this category.
Parameters
Name | Description |
---|---|
category: YamlCategory
|
|
key: String
|
|
secondaryKey: String
|
|
thirdKey: String
|
ReturnValue
Name | Description |
---|---|
String
|
letterify
fun String.letterify(): String
Replaces every ?
char for this String receiver with a random upper-case letter from the English alphabet
and returns the modified String.
Receiver
Name | Description |
---|---|
String
|
ReturnValue
Name | Description |
---|---|
String
|
Internal class used for resolving yaml expressions into values.