Class: Faker::Source
- Inherits:
-
Base
- Object
- Base
- Faker::Source
show all
- Defined in:
- lib/faker/default/source.rb
Constant Summary
Constants inherited
from Base
Base::Letters, Base::Numbers, Base::ULetters
Class Method Summary
collapse
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale
Class Method Details
.hello_world(lang = :ruby) ⇒ Object
6
7
8
|
# File 'lib/faker/default/source.rb', line 6
def hello_world(lang = :ruby)
fetch("source.hello_world.#{lang}")
end
|
.print(str: 'some string', lang: :ruby) ⇒ Object
10
11
12
13
|
# File 'lib/faker/default/source.rb', line 10
def print(str: 'some string', lang: :ruby)
code = fetch("source.print.#{lang}")
code.gsub('faker_string_to_print', str)
end
|
.print_1_to_10(lang = :ruby) ⇒ Object
15
16
17
|
# File 'lib/faker/default/source.rb', line 15
def print_1_to_10(lang = :ruby)
fetch("source.print_1_to_10.#{lang}")
end
|