Class: Faker::App
Constant Summary
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.author ⇒ String
Produces the name of an app’s author.
-
.name ⇒ String
Produces an app name.
-
.semantic_version(major: 0..9, minor: 0..9, patch: 1..9) ⇒ String
Produces a String representing a semantic version identifier.
-
.version ⇒ String
Produces a version string.
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
.author ⇒ String
Produces the name of an app’s author.
41 42 43 |
# File 'lib/faker/default/app.rb', line 41 def parse('app.author') end |
.name ⇒ String
Produces an app name.
15 16 17 |
# File 'lib/faker/default/app.rb', line 15 def name fetch('app.name') end |
.semantic_version(major: 0..9, minor: 0..9, patch: 1..9) ⇒ String
Produces a String representing a semantic version identifier.
63 64 65 |
# File 'lib/faker/default/app.rb', line 63 def semantic_version(major: 0..9, minor: 0..9, patch: 1..9) [major, minor, patch].map { |chunk| sample(Array(chunk)) }.join('.') end |
.version ⇒ String
Produces a version string.
28 29 30 |
# File 'lib/faker/default/app.rb', line 28 def version parse('app.version') end |