Module: Faker::String
Constant Summary
collapse
- BACKSLASH =
'\\'
- LOWERS =
[*'a'..'z']
- UPPERS =
[*'A'..'Z']
- LETTERS =
LOWERS + UPPERS
- NUMBERS =
[*'0'..'9']
- WORD_CHARS =
LETTERS + NUMBERS + ['_']
- SPACES =
[" ", "\t"]
- ESCAPEABLE_CHARS =
'\\', '/', '.', '(', ')', '[', ']', '{', '}'
Instance Method Summary
collapse
const_missing, k, underscore
Instance Method Details
#from_regexp(exp) ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/ffaker/string.rb', line 18
def from_regexp(exp)
result = ''
@last_token = nil
tokens = exp.inspect[1...-1].split(//)
until tokens.empty?
result << process_token(tokens)
end
result
end
|