Class: Faker::App

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/default/app.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

.authorObject


14
15
16
# File 'lib/faker/default/app.rb', line 14

def author
  parse('app.author')
end

.nameObject


6
7
8
# File 'lib/faker/default/app.rb', line 6

def name
  fetch('app.name')
end

.semantic_version(major: 0..9, minor: 0..9, patch: 1..9) ⇒ Object


18
19
20
# File 'lib/faker/default/app.rb', line 18

def semantic_version(major: 0..9, minor: 0..9, patch: 1..9)
  [major, minor, patch].map { |chunk| sample(Array(chunk)) }.join('.')
end

.versionObject


10
11
12
# File 'lib/faker/default/app.rb', line 10

def version
  parse('app.version')
end