Class: Faker::Creature::Dog

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/creature/dog.rb

Constant Summary

Constants inherited from Base

Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters

Class Method Summary collapse

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

.ageString

Produces a random dog age

Examples:

Faker::Creature::Dog.age #=> "puppy"

Returns:

  • (String)

Available since:

  • 1.9.2



70
71
72
# File 'lib/faker/creature/dog.rb', line 70

def age
  fetch('creature.dog.age')
end

.breedString

Produces a random dog breed

Examples:

Faker::Creature::Dog.breed #=> "Yorkshire Terrier"

Returns:

  • (String)

Available since:

  • 1.9.2



31
32
33
# File 'lib/faker/creature/dog.rb', line 31

def breed
  fetch('creature.dog.breed')
end

.coat_lengthString

Produces a random coat length

Examples:

Faker::Creature::Dog.coat_length #=> "short"

Returns:

  • (String)

Available since:

  • 1.9.2



96
97
98
# File 'lib/faker/creature/dog.rb', line 96

def coat_length
  fetch('creature.dog.coat_length')
end

.genderString

Produces a random gender

Examples:

Faker::Creature::Dog.gender #=> "Female"

Returns:

  • (String)

Available since:

  • 1.9.2



83
84
85
# File 'lib/faker/creature/dog.rb', line 83

def gender
  Faker::Gender.binary_type
end

.meme_phraseString

Produces a random dog meme phrase

Examples:

Faker::Creature::Dog.meme_phrase #=> "smol pupperino"

Returns:

  • (String)

Available since:

  • 1.9.2



57
58
59
# File 'lib/faker/creature/dog.rb', line 57

def meme_phrase
  fetch('creature.dog.meme_phrase')
end

.nameString

Produces a random name for a dog

Examples:

Faker::Creature::Dog.name #=> "Spike"

Returns:

  • (String)

Available since:

  • 1.9.2



18
19
20
# File 'lib/faker/creature/dog.rb', line 18

def name
  fetch('creature.dog.name')
end

.sizeString

Produces a random size of a dog

Examples:

Faker::Creature::Dog.size #=> "small"

Returns:

  • (String)

Available since:

  • 1.9.2



109
110
111
# File 'lib/faker/creature/dog.rb', line 109

def size
  fetch('creature.dog.size')
end

.soundString

Produces a random sound made by a dog

Examples:

Faker::Creature::Dog.sound #=> "woof woof"

Returns:

  • (String)

Available since:

  • 1.9.2



44
45
46
# File 'lib/faker/creature/dog.rb', line 44

def sound
  fetch('creature.dog.sound')
end