diff --git a/README.md b/README.md index 493a38fef3..5d4e075192 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # Faker [![Build Status](https://travis-ci.org/faker-ruby/faker.svg?branch=master)](https://travis-ci.org/faker-ruby/faker) [![Gem Version](https://badge.fury.io/rb/faker.svg)](https://badge.fury.io/rb/faker) -[![Inline docs](http://inch-ci.org/github/stympy/faker.svg?branch=master)](http://inch-ci.org/github/stympy/faker) +[![Inline docs](https://inch-ci.org/github/faker-ruby/faker.svg?branch=master)](https://inch-ci.org/github/faker-ruby/faker) [![Test Coverage](https://api.codeclimate.com/v1/badges/ef54c7f9df86e965d64b/test_coverage)](https://codeclimate.com/github/stympy/faker/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/ef54c7f9df86e965d64b/maintainability)](https://codeclimate.com/github/stympy/faker/maintainability) diff --git a/lib/faker/default/appliance.rb b/lib/faker/default/appliance.rb index 001f28dacb..4c9402400d 100644 --- a/lib/faker/default/appliance.rb +++ b/lib/faker/default/appliance.rb @@ -3,10 +3,28 @@ module Faker class Appliance < Base class << self + ## + # Produces the name of an appliance brand. + # + # @return [String] + # + # @example + # Faker::Appliance.brand #=> "Bosch" + # + # @faker.version 1.9.0 def brand fetch('appliance.brand') end + ## + # Produces the name of a type of appliance equipment. + # + # @return [String] + # + # @example + # Faker::Appliance.equipment #=> "Appliance plug" + # + # @faker.version 1.9.0 def equipment fetch('appliance.equipment') end diff --git a/lib/faker/default/dessert.rb b/lib/faker/default/dessert.rb index 588b249b2d..31d4b1b749 100644 --- a/lib/faker/default/dessert.rb +++ b/lib/faker/default/dessert.rb @@ -5,14 +5,41 @@ class Dessert < Base flexible :dessert class << self + ## + # Produces the name of a dessert variety. + # + # @return [String] + # + # @example + # Faker::Dessert.variety #=> "Cake" + # + # @faker.version 1.8.0 def variety fetch('dessert.variety') end + ## + # Produces the name of a dessert topping. + # + # @return [String] + # + # @example + # Faker::Dessert.topping #=> "Gummy Bears" + # + # @faker.version 1.8.0 def topping fetch('dessert.topping') end + ## + # Produces the name of a dessert flavor. + # + # @return [String] + # + # @example + # Faker::Dessert.flavor #=> "Salted Caramel" + # + # @faker.version 1.8.0 def flavor fetch('dessert.flavor') end diff --git a/lib/faker/default/device.rb b/lib/faker/default/device.rb index 04412daafe..a46aa8ea98 100644 --- a/lib/faker/default/device.rb +++ b/lib/faker/default/device.rb @@ -3,26 +3,80 @@ module Faker class Device < Base class << self + ## + # Produces a build number between 1 and 500. + # + # @return [Integer] + # + # @example + # Faker::Device.build_number #=> 5 + # + # @faker.version 1.9.0 def build_number Faker::Number.between(from: 1, to: 500) end + ## + # Produces the name of a manufacturer for a device. + # + # @return [String] + # + # @example + # Faker::Device.manufacturer #=> "Apple" + # + # @faker.version 1.9.0 def manufacturer fetch('device.manufacturer') end + ## + # Produces a model name for a device. + # + # @return [String] + # + # @example + # Faker::Device.model_name #=> "iPhone 4" + # + # @faker.version 1.9.0 def model_name fetch('device.model_name') end + ## + # Produces the name of a platform for a device. + # + # @return [String] + # + # @example + # Faker::Device.platform #=> "webOS" + # + # @faker.version 1.9.0 def platform fetch('device.platform') end + ## + # Produces a serial code for a device. + # + # @return [String] + # + # @example + # Faker::Device.serial #=> "ejfjnRNInxh0363JC2WM" + # + # @faker.version 1.9.0 def serial fetch('device.serial') end + ## + # Produces a version number between 1 and 1000. + # + # @return [Integer] + # + # @example + # Faker::Device.version #=> 42 + # + # @faker.version 1.9.0 def version Faker::Number.between(from: 1, to: 1000) end diff --git a/lib/faker/default/electrical_components.rb b/lib/faker/default/electrical_components.rb index 4f560ae94d..5c0f52ec7b 100644 --- a/lib/faker/default/electrical_components.rb +++ b/lib/faker/default/electrical_components.rb @@ -5,14 +5,41 @@ class ElectricalComponents < Base flexible :electrical_components class << self + ## + # Produces an active electrical component. + # + # @return [String] + # + # @example + # Faker::ElectricalComponents.active #=> "Transistor" + # + # @faker.version 1.9.0 def active fetch('electrical_components.active') end + ## + # Produces a passive electrical component. + # + # @return [String] + # + # @example + # Faker::ElectricalComponents.passive #=> "Resistor" + # + # @faker.version 1.9.0 def passive fetch('electrical_components.passive') end + ## + # Produces an electromechanical electrical component. + # + # @return [String] + # + # @example + # Faker::ElectricalComponents.electromechanical #=> "Toggle Switch" + # + # @faker.version 1.9.0 def electromechanical fetch('electrical_components.electromechanical') end diff --git a/lib/faker/default/greek_philosophers.rb b/lib/faker/default/greek_philosophers.rb index 5b20410a1c..d97731ae29 100644 --- a/lib/faker/default/greek_philosophers.rb +++ b/lib/faker/default/greek_philosophers.rb @@ -3,10 +3,28 @@ module Faker class GreekPhilosophers < Base class << self + ## + # Produces the name of a Greek philosopher. + # + # @return [String] + # + # @example + # Faker::GreekPhilosophers.name #=> "Socrates" + # + # @faker.version 1.9.0 def name fetch('greek_philosophers.names') end + ## + # Produces a quote from a Greek philosopher. + # + # @return [String] + # + # @example + # Faker::GreekPhilosophers.quote #=> "Only the educated are free." + # + # @faker.version 1.9.0 def quote fetch('greek_philosophers.quotes') end diff --git a/lib/faker/default/industry_segments.rb b/lib/faker/default/industry_segments.rb index 8b34686872..e98ca069cf 100644 --- a/lib/faker/default/industry_segments.rb +++ b/lib/faker/default/industry_segments.rb @@ -5,18 +5,54 @@ class IndustrySegments < Base flexible :industry_segments class << self + ## + # Produces the name of an industry. + # + # @return [String] + # + # @example + # Faker::IndustrySegments.industry #=> "Basic Materials" + # + # @faker.version 1.9.2 def industry fetch('industry_segments.industry') end + ## + # Produces the name of a super-sector of an industry. + # + # @return [String] + # + # @example + # Faker::IndustrySegments.super_sector #=> "Basic Resources" + # + # @faker.version 1.9.2 def super_sector fetch('industry_segments.super_sector') end + ## + # Produces the name of a sector of an industry. + # + # @return [String] + # + # @example + # Faker::IndustrySegments.sector #=> "Industrial Metals & Mining" + # + # @faker.version 1.9.2 def sector fetch('industry_segments.sector') end + ## + # Produces the name of a subsector of an industry. + # + # @return [String] + # + # @example + # Faker::IndustrySegments.industry #=> "Basic Materials" + # + # @faker.version 1.9.2 def sub_sector fetch('industry_segments.sub_sector') end diff --git a/lib/faker/default/marketing.rb b/lib/faker/default/marketing.rb index 08212763a7..1d81da4ff3 100644 --- a/lib/faker/default/marketing.rb +++ b/lib/faker/default/marketing.rb @@ -5,6 +5,15 @@ class Marketing < Base flexible :marketing class << self + ## + # Produces the name of a video game console or platform. + # + # @return [String] + # + # @example + # Faker::Marketing.buzzwords #=> "rubber meets the road" + # + # @faker.version 1.9.4 def buzzwords fetch('marketing.buzzwords') end diff --git a/lib/faker/default/military.rb b/lib/faker/default/military.rb index ac9e0f6bf8..ecdf44cc9a 100644 --- a/lib/faker/default/military.rb +++ b/lib/faker/default/military.rb @@ -3,22 +3,67 @@ module Faker class Military < Base class << self + ## + # Produces a rank in the U.S. Army. + # + # @return [String] + # + # @example + # Faker::Military.army_rank #=> "Staff Sergeant" + # + # @faker.version 1.9.0 def army_rank fetch('military.army_rank') end + ## + # Produces a rank in the U.S. Marines. + # + # @return [String] + # + # @example + # Faker::Military.marines_rank #=> "Gunnery Sergeant" + # + # @faker.version 1.9.0 def marines_rank fetch('military.marines_rank') end + ## + # Produces a rank in the U.S. Navy. + # + # @return [String] + # + # @example + # Faker::Military.navy_rank #=> "Seaman" + # + # @faker.version 1.9.0 def navy_rank fetch('military.navy_rank') end + ## + # Produces a rank in the U.S. Air Force. + # + # @return [String] + # + # @example + # Faker::Military.air_force_rank #=> "Captain" + # + # @faker.version 1.9.0 def air_force_rank fetch('military.air_force_rank') end + ## + # Produces a U.S. Department of Defense Paygrade. + # + # @return [String] + # + # @example + # Faker::Military.dod_paygrade #=> "E-6" + # + # @faker.version 1.9.0 def dod_paygrade fetch('military.dod_paygrade') end diff --git a/lib/faker/default/nato_phonetic_alphabet.rb b/lib/faker/default/nato_phonetic_alphabet.rb index f9c53f8a6e..5247966d99 100644 --- a/lib/faker/default/nato_phonetic_alphabet.rb +++ b/lib/faker/default/nato_phonetic_alphabet.rb @@ -3,6 +3,15 @@ module Faker class NatoPhoneticAlphabet < Base class << self + ## + # Produces a code word from the NATO phonetic alphabet. + # + # @return [String] + # + # @example + # Faker::NatoPhoneticAlphabet.code_word #=> "Hotel" + # + # @faker.version 1.9.0 def code_word fetch('nato_phonetic_alphabet.code_word') end diff --git a/lib/faker/default/science.rb b/lib/faker/default/science.rb index b85a9668c5..4385b488e6 100644 --- a/lib/faker/default/science.rb +++ b/lib/faker/default/science.rb @@ -3,14 +3,41 @@ module Faker class Science < Base class << self + ## + # Produces the name of a element. + # + # @return [String] + # + # @example + # Faker::Science.element #=> "Carbon" + # + # @faker.version 1.8.5 def element fetch('science.element') end + ## + # Produces the symbol of an element. + # + # @return [String] + # + # @example + # Faker::Science.element_symbol #=> "Pb" + # + # @faker.version 1.9.0 def element_symbol fetch('science.element_symbol') end + ## + # Produces the name of a scientist. + # + # @return [String] + # + # @example + # Faker::Science.scientist #=> "Isaac Newton" + # + # @faker.version 1.8.5 def scientist fetch('science.scientist') end diff --git a/lib/faker/default/subscription.rb b/lib/faker/default/subscription.rb index c35a05e44d..cc6d842863 100644 --- a/lib/faker/default/subscription.rb +++ b/lib/faker/default/subscription.rb @@ -2,22 +2,67 @@ module Faker class Subscription < Base + ## + # Produces the name of a subscription plan. + # + # @return [String] + # + # @example + # Faker::Subscription.plan #=> "Platinum" + # + # @faker.version 1.9.2 def self.plan fetch('subscription.plans') end + ## + # Produces a subscription status. + # + # @return [String] + # + # @example + # Faker::Subscription.status #=> "Active" + # + # @faker.version 1.9.2 def self.status fetch('subscription.statuses') end + ## + # Produces the name of a payment method. + # + # @return [String] + # + # @example + # Faker::Subscription.payment_method #=> "PayPal" + # + # @faker.version 1.9.2 def self.payment_method fetch('subscription.payment_methods') end + ## + # Produces the name of a subscription term. + # + # @return [String] + # + # @example + # Faker::Subscription.subscription_term #=> "Annual" + # + # @faker.version 1.9.2 def self.subscription_term fetch('subscription.subscription_terms') end + ## + # Produces the name of a payment term. + # + # @return [String] + # + # @example + # Faker::Subscription.payment_term #=> "Monthly" + # + # @faker.version 1.9.2 def self.payment_term fetch('subscription.payment_terms') end diff --git a/lib/faker/default/superhero.rb b/lib/faker/default/superhero.rb index e2daf6138e..22adb3bf00 100644 --- a/lib/faker/default/superhero.rb +++ b/lib/faker/default/superhero.rb @@ -3,22 +3,67 @@ module Faker class Superhero < Base class << self + ## + # Produces a superpower. + # + # @return [String] + # + # @example + # Faker::Superhero.power #=> "Photokinesis" + # + # @faker.version 1.6.2 def power fetch('superhero.power') end + ## + # Produces a superhero name prefix. + # + # @return [String] + # + # @example + # Faker::Superhero.prefix #=> "the Fated" + # + # @faker.version 1.6.2 def prefix fetch('superhero.prefix') end + ## + # Produces a superhero name suffix. + # + # @return [String] + # + # @example + # Faker::Superhero.suffix #=> "Captain" + # + # @faker.version 1.6.2 def suffix fetch('superhero.suffix') end + ## + # Produces a superhero descriptor. + # + # @return [String] + # + # @example + # Faker::Superhero.descriptor #=> "Bizarro" + # + # @faker.version 1.6.2 def descriptor fetch('superhero.descriptor') end + ## + # Produces a random superhero name. + # + # @return [String] + # + # @example + # Faker::Superhero.name #=> "Magnificent Shatterstar" + # + # @faker.version 1.6.2 def name parse('superhero.name') end diff --git a/lib/faker/games/dota.rb b/lib/faker/games/dota.rb index 6eb3a7831a..267e0a58d0 100644 --- a/lib/faker/games/dota.rb +++ b/lib/faker/games/dota.rb @@ -4,22 +4,69 @@ module Faker class Games class Dota < Base class << self + ## + # Produces the name of a hero from Dota. + # + # @return [String] + # + # @example + # Faker::Games::Dota.hero #=> "Abaddon" + # + # @faker.version 1.9.0 def hero fetch('games.dota.hero') end + ## + # Produces the name of an item from Dota. + # + # @return [String] + # + # @example + # Faker::Games::Dota.item #=> "Armlet of Mordiggian" + # + # @faker.version 1.9.0 def item fetch('games.dota.item') end + ## + # Produces the name of a professional Dota team. + # + # @return [String] + # + # @example + # Faker::Games::Dota.team #=> "Evil Geniuses" + # + # @faker.version 1.9.0 def team fetch('games.dota.team') end + ## + # Produces the name of a professional Dota player. + # + # @return [String] + # + # @example + # Faker::Games::Dota.player #=> "Dendi" + # + # @faker.version 1.9.0 def player fetch('games.dota.player') end + ## + # Produces the name of a hero from Dota. + # + # @param hero [String] The name of a Dota hero. + # @return [String] + # + # @example + # Faker::Games::Dota.quote #=> "You have called death upon yourself." + # Faker::Games::Dota.quote(hero: 'alchemist') #=> "Better living through alchemy!" + # + # @faker.version 1.9.0 def quote(legacy_hero = NOT_GIVEN, hero: 'abaddon') warn_for_deprecated_arguments do |keywords| keywords << :hero if legacy_hero != NOT_GIVEN diff --git a/lib/faker/games/heroes.rb b/lib/faker/games/heroes.rb index fb1b3f2076..9c768aa5c7 100644 --- a/lib/faker/games/heroes.rb +++ b/lib/faker/games/heroes.rb @@ -4,14 +4,41 @@ module Faker class Games class Heroes < Base class << self + ## + # Produces the name of a hero from Heroes 3. + # + # @return [String] + # + # @example + # Faker::Games::Heroes.name #=> "Christian" + # + # @faker.version 1.9.2 def name fetch('heroes.names') end + ## + # Produces the name of a specialty from Heroes 3. + # + # @return [String] + # + # @example + # Faker::Games::Heroes.specialty #=> "Ballista" + # + # @faker.version 1.9.2 def specialty fetch('heroes.specialties') end + ## + # Produces the name of a class from Heroes 3. + # + # @return [String] + # + # @example + # Faker::Games::Heroes.klass #=> "Knight" + # + # @faker.version 1.9.2 def klass fetch('heroes.klasses') end diff --git a/lib/faker/games/heroes_of_the_storm.rb b/lib/faker/games/heroes_of_the_storm.rb index 7a9028c6b4..ba3ad91b1c 100644 --- a/lib/faker/games/heroes_of_the_storm.rb +++ b/lib/faker/games/heroes_of_the_storm.rb @@ -4,18 +4,54 @@ module Faker class Games class HeroesOfTheStorm < Base class << self + ## + # Produces a battleground from Heroes of the Storm. + # + # @return [String] + # + # @example + # Faker::Games::HeroesOfTheStorm.battleground #=> "Towers of Doom" + # + # @faker.version 1.9.2 def battleground fetch('heroes_of_the_storm.battlegrounds') end + ## + # Produces a class from Heroes of the Storm. + # + # @return [String] + # + # @example + # Faker::Games::HeroesOfTheStorm.class #=> "Support" + # + # @faker.version 1.9.2 def class fetch('heroes_of_the_storm.classes') end + ## + # Produces a hero from Heroes of the Storm. + # + # @return [String] + # + # @example + # Faker::Games::HeroesOfTheStorm.hero #=> "Illidan" + # + # @faker.version 1.9.2 def hero fetch('heroes_of_the_storm.heroes') end + ## + # Produces a quote from Heroes of the Storm. + # + # @return [String] + # + # @example + # Faker::Games::HeroesOfTheStorm.quote #=> "MEAT!!!" + # + # @faker.version 1.9.2 def quote fetch('heroes_of_the_storm.quotes') end diff --git a/lib/faker/games/league_of_legends.rb b/lib/faker/games/league_of_legends.rb index 5f23d062e5..7b40a072b6 100644 --- a/lib/faker/games/league_of_legends.rb +++ b/lib/faker/games/league_of_legends.rb @@ -4,26 +4,80 @@ module Faker class Games class LeagueOfLegends < Base class << self + ## + # Produces the name of a champion from League of Legends. + # + # @return [String] + # + # @example + # Faker::Games::LeagueOfLegends.champion #=> "Jarvan IV" + # + # @faker.version 1.8.0 def champion fetch('games.league_of_legends.champion') end + ## + # Produces a location from League of Legends. + # + # @return [String] + # + # @example + # Faker::Games::LeagueOfLegends.location #=> "Demacia" + # + # @faker.version 1.8.0 def location fetch('games.league_of_legends.location') end + ## + # Produces a quote from League of Legends. + # + # @return [String] + # + # @example + # Faker::Games::LeagueOfLegends.quote #=> "Purge the unjust." + # + # @faker.version 1.8.0 def quote fetch('games.league_of_legends.quote') end + ## + # Produces a summoner spell from League of Legends. + # + # @return [String] + # + # @example + # Faker::Games::LeagueOfLegends.summoner_spell #=> "Flash" + # + # @faker.version 1.8.0 def summoner_spell fetch('games.league_of_legends.summoner_spell') end + ## + # Produces a mastery from League of Legends. + # + # @return [String] + # + # @example + # Faker::Games::LeagueOfLegends.masteries #=> "Double Edged Sword" + # + # @faker.version 1.8.0 def masteries fetch('games.league_of_legends.masteries') end + ## + # Produces a rank from League of Legends. + # + # @return [String] + # + # @example + # Faker::Games::LeagueOfLegends.rank #=> "Bronze V" + # + # @faker.version 1.8.0 def rank fetch('games.league_of_legends.rank') end diff --git a/lib/faker/games/myst.rb b/lib/faker/games/myst.rb index c1bcbf974c..0e58ef9ae1 100644 --- a/lib/faker/games/myst.rb +++ b/lib/faker/games/myst.rb @@ -4,22 +4,67 @@ module Faker class Games class Myst < Base class << self + ## + # Produces the name of a game from the Myst series. + # + # @return [String] + # + # @example + # Faker::Games::Myst.game #=> "Myst III: Exile" + # + # @faker.version 1.9.0 def game fetch('games.myst.games') end + ## + # Produces the name of a creature from Myst. + # + # @return [String] + # + # @example + # Faker::Games::Myst.creature #=> "squee" + # + # @faker.version 1.9.0 def creature fetch('games.myst.creatures') end + ## + # Produces the name of an age from Myst. + # + # @return [String] + # + # @example + # Faker::Games::Myst.age #=> "Relto" + # + # @faker.version 1.9.0 def age fetch('games.myst.ages') end + ## + # Produces the name of a chracter from Myst. + # + # @return [String] + # + # @example + # Faker::Games::Myst.character #=> "Gehn" + # + # @faker.version 1.9.0 def character fetch('games.myst.characters') end + ## + # Produces a quote from Myst. + # + # @return [String] + # + # @example + # Faker::Games::Myst.quote #=> "I realized, the moment I fell into the fissure, that the Book would not be destroyed as I had planned." + # + # @faker.version 1.9.0 def quote fetch('games.myst.quotes') end diff --git a/lib/faker/games/pokemon.rb b/lib/faker/games/pokemon.rb index 65c383460c..f2ac903747 100644 --- a/lib/faker/games/pokemon.rb +++ b/lib/faker/games/pokemon.rb @@ -4,14 +4,41 @@ module Faker class Games class Pokemon < Base class << self + ## + # Produces the name of a Pokemon. + # + # @return [String] + # + # @example + # Faker::Games::Pokemon.name #=> "Pikachu" + # + # @faker.version 1.7.0 def name fetch('games.pokemon.names') end + ## + # Produces a location from Pokemon. + # + # @return [String] + # + # @example + # Faker::Games::Pokemon.location #=> "Pallet Town" + # + # @faker.version 1.7.0 def location fetch('games.pokemon.locations') end + ## + # Produces a move from Pokemon. + # + # @return [String] + # + # @example + # Faker::Games::Pokemon.move #=> "Thunder Shock" + # + # @faker.version 1.7.0 def move fetch('games.pokemon.moves') end diff --git a/lib/faker/games/sonic_the_hedgehog.rb b/lib/faker/games/sonic_the_hedgehog.rb index 6f5dda0eca..779306ccb4 100644 --- a/lib/faker/games/sonic_the_hedgehog.rb +++ b/lib/faker/games/sonic_the_hedgehog.rb @@ -4,14 +4,41 @@ module Faker class Games class SonicTheHedgehog < Base class << self + ## + # Produces the name of a character from Sonic the Hedgehog. + # + # @return [String] + # + # @example + # Faker::Games::SonicTheHedgehog.character #=> "Sonic the Hedgehog" + # + # @faker.version 1.9.2 def character fetch('games.sonic_the_hedgehog.character') end + ## + # Produces the name of a zone from Sonic the Hedgehog. + # + # @return [String] + # + # @example + # Faker::Games::SonicTheHedgehog.zone #=> "Green Hill Zone" + # + # @faker.version 1.9.2 def zone fetch('games.sonic_the_hedgehog.zone') end + ## + # Produces the name of a game from the Sonic the Hedgehog series. + # + # @return [String] + # + # @example + # Faker::Games::SonicTheHedgehog.game #=> "Waku Waku Sonic Patrol Car" + # + # @faker.version 1.9.2 def game fetch('games.sonic_the_hedgehog.game') end diff --git a/lib/faker/games/witcher.rb b/lib/faker/games/witcher.rb index d66d463d99..71e6c8b7b0 100644 --- a/lib/faker/games/witcher.rb +++ b/lib/faker/games/witcher.rb @@ -4,26 +4,80 @@ module Faker class Games class Witcher < Base class << self + ## + # Produces the name of a character from The Witcher. + # + # @return [String] + # + # @example + # Faker::Games::Witcher.character #=> "Triss Merigold" + # + # @faker.version 1.8.3 def character fetch('games.witcher.characters') end + ## + # Produces the name of a witcher from The Witcher. + # + # @return [String] + # + # @example + # Faker::Games::Witcher.witcher #=> "Geralt of Rivia" + # + # @faker.version 1.8.3 def witcher fetch('games.witcher.witchers') end + ## + # Produces the name of a school from The Witcher. + # + # @return [String] + # + # @example + # Faker::Games::Witcher.school #=> "Wolf" + # + # @faker.version 1.8.3 def school fetch('games.witcher.schools') end + ## + # Produces the name of a location from The Witcher. + # + # @return [String] + # + # @example + # Faker::Games::Witcher.location #=> "Novigrad" + # + # @faker.version 1.8.3 def location fetch('games.witcher.locations') end + ## + # Produces a quote from The Witcher. + # + # @return [String] + # + # @example + # Faker::Games::Witcher.quote #=> "No Lollygagin'!" + # + # @faker.version 1.8.3 def quote fetch('games.witcher.quotes') end + ## + # Produces the name of a monster from The Witcher. + # + # @return [String] + # + # @example + # Faker::Games::Witcher.monster #=> "Katakan" + # + # @faker.version 1.8.3 def monster fetch('games.witcher.monsters') end diff --git a/lib/faker/games/world_of_warcraft.rb b/lib/faker/games/world_of_warcraft.rb index 88ca2901c9..4fa9802c20 100644 --- a/lib/faker/games/world_of_warcraft.rb +++ b/lib/faker/games/world_of_warcraft.rb @@ -4,10 +4,28 @@ module Faker class Games class WorldOfWarcraft < Base class << self + ## + # Produces the name of a hero from World of Warcraft. + # + # @return [String] + # + # @example + # Faker::Games::WorldOfWarcraft.hero #=> "Uther the Lightbringer" + # + # @faker.version 1.9.2 def hero fetch('games.world_of_warcraft.hero') end + ## + # Produces a quote from World of Warcraft. + # + # @return [String] + # + # @example + # Faker::Games::WorldOfWarcraft.quote #=> "These are dark times indeed." + # + # @faker.version 1.9.2 def quote fetch('games.world_of_warcraft.quotes') end diff --git a/lib/faker/japanese_media/dragon_ball.rb b/lib/faker/japanese_media/dragon_ball.rb index ee632a43c0..4f8bccecbe 100644 --- a/lib/faker/japanese_media/dragon_ball.rb +++ b/lib/faker/japanese_media/dragon_ball.rb @@ -4,6 +4,15 @@ module Faker class JapaneseMedia class DragonBall < Base class << self + ## + # Produces the name of a character from Dragon Ball. + # + # @return [String] + # + # @example + # Faker::Games::DragonBall.character #=> "Goku" + # + # @faker.version 1.8.0 def character fetch('dragon_ball.characters') end diff --git a/lib/faker/japanese_media/sword_art_online.rb b/lib/faker/japanese_media/sword_art_online.rb index bab6360b1e..30a36c82f4 100644 --- a/lib/faker/japanese_media/sword_art_online.rb +++ b/lib/faker/japanese_media/sword_art_online.rb @@ -4,18 +4,54 @@ module Faker class JapaneseMedia class SwordArtOnline < Base class << self + ## + # Produces the real name of a character from Sword Art Online. + # + # @return [String] + # + # @example + # Faker::JapaneseMedia::SwordArtOnline.real_name #=> "Kirigaya Kazuto" + # + # @faker.version 1.9.0 def real_name fetch('sword_art_online.real_name') end + ## + # Produces the in-game name of a character from Sword Art Online. + # + # @return [String] + # + # @example + # Faker::JapaneseMedia::SwordArtOnline.game_name #=> "Silica" + # + # @faker.version 1.9.0 def game_name fetch('sword_art_online.game_name') end + ## + # Produces the name of a location from Sword Art Online. + # + # @return [String] + # + # @example + # Faker::JapaneseMedia::SwordArtOnline.location #=> "Ruby Palace" + # + # @faker.version 1.9.0 def location fetch('sword_art_online.location') end + ## + # Produces the name of an item from Sword Art Online. + # + # @return [String] + # + # @example + # Faker::JapaneseMedia::SwordArtOnline.item #=> "Blackwyrm Coat" + # + # @faker.version 1.9.0 def item fetch('sword_art_online.item') end diff --git a/lib/faker/movies/hobbit.rb b/lib/faker/movies/hobbit.rb index 051880fbef..31601be8bb 100644 --- a/lib/faker/movies/hobbit.rb +++ b/lib/faker/movies/hobbit.rb @@ -4,18 +4,55 @@ module Faker class Movies class Hobbit < Base class << self + ## + # Produces the name of a character from The Hobbit. + # + # @return [String] + # + # @example + # Faker::Movies::Hobbit.character #=> "Gandalf the Grey" + # + # @faker.version 1.8.0 def character fetch('hobbit.character') end + ## + # Produces the name of one of the 13 dwarves from the Company, or Gandalf or Bilbo. + # + # @return [String] + # + # @example + # Faker::Movies::Hobbit.thorins_company #=> "Thorin Oakenshield" + # + # @faker.version 1.8.0 def thorins_company fetch('hobbit.thorins_company') end + ## + # Produces a quote from The Hobbit. + # + # @return [String] + # + # @example + # Faker::Movies::Hobbit.quote + # #=> "Never laugh at live dragons, Bilbo you fool!" + # + # @faker.version 1.8.0 def quote fetch('hobbit.quote') end + ## + # Produces the name of a location from The Hobbit. + # + # @return [String] + # + # @example + # Faker::Movies::Hobbit.location #=> "The Shire" + # + # @faker.version 1.8.0 def location fetch('hobbit.location') end diff --git a/lib/faker/movies/movie.rb b/lib/faker/movies/movie.rb index 81eb9d0754..84e3c2b494 100644 --- a/lib/faker/movies/movie.rb +++ b/lib/faker/movies/movie.rb @@ -3,6 +3,15 @@ module Faker class Movie < Base class << self + ## + # Produces a quote from a movie. + # + # @return [String] + # + # @example + # Faker::Movie.quote #=> "Bumble bee tuna" + # + # @faker.version 1.8.1 def quote fetch('movie.quote') end diff --git a/lib/faker/music/grateful_dead.rb b/lib/faker/music/grateful_dead.rb index 38ad96dfc1..b7d0853e0d 100644 --- a/lib/faker/music/grateful_dead.rb +++ b/lib/faker/music/grateful_dead.rb @@ -6,10 +6,28 @@ module Faker class Music class GratefulDead < Base class << self + ## + # Produces the name of a member of The Grateful Dead. + # + # @return [String] + # + # @example + # Faker::Music::GratefulDead.player #=> "Jerry Garcia" + # + # @faker.version 1.9.2 def player fetch('grateful_dead.players') end + ## + # Produces the name of a song by The Grateful Dead. + # + # @return [String] + # + # @example + # Faker::Music::GratefulDead.song #=> "Cassidy" + # + # @faker.version 1.9.2 def song fetch('grateful_dead.songs') end diff --git a/lib/faker/music/phish.rb b/lib/faker/music/phish.rb index cf839679ba..85ec728dfd 100644 --- a/lib/faker/music/phish.rb +++ b/lib/faker/music/phish.rb @@ -4,6 +4,15 @@ module Faker class Music class Phish < Base class << self + ## + # Produces the name of a song by Phish. + # + # @return [String] + # + # @example + # Faker::Music::Phish.song #=> "Tweezer" + # + # @faker.version 1.9.2 def song fetch('phish.song') end diff --git a/lib/faker/music/rock_band.rb b/lib/faker/music/rock_band.rb index 26205dbd8e..d9f74570eb 100644 --- a/lib/faker/music/rock_band.rb +++ b/lib/faker/music/rock_band.rb @@ -4,6 +4,15 @@ module Faker class Music class RockBand < Base class << self + ## + # Produces the name of a rock band. + # + # @return [String] + # + # @example + # Faker::Music::RockBand.name #=> "Led Zeppelin" + # + # @faker.version 1.7.0 def name fetch('rock_band.name') end