Skip to content

Commit

Permalink
Add more YARD docs (#1740)
Browse files Browse the repository at this point in the history
* Add YARD docs for a few games.

- Pokemon
- Sonic the Hedgehog
- Heroes of the Storm

* Add more YARD docs for games and anime.

- Heroes 3
- Dragon Ball
- Myst
- World of Warcraft

* Add YARD docs for some miscellaneous classes.

- IndustrySegments
- ElectricalComponents
- GreekPhilosophers

* Add YARD docs for Device and Dessert fakers.

* Add YARD doc for Faker::RockBand

* Fix typo in DragonBall YARD doc.

* Add YARD docs for Dota and League of Legends.

* Add YARD docs for The Witcher.

* Add YARD docs for Faker::Military

* Add YARD docs for Faker::Appliance.

* Add YARD docs for Faker::Subscription.

* Add YARD docs for SAO.

* Add YARD docs for The Hobbit.

* Add a YARD doc for Faker::Movie

* Add YARD docs for Faker::Science.

* Add YARD docs for Faker::Marketing.

* Add YARD docs for Faker::Superhero.

* Add YARD doc for Faker::NatoPhoneticAlphabet.

* Add YARD docs for GratefulDead and Phish.

* Update Inch CI badge in README.

* Change Inch CI link to HTTPS.
  • Loading branch information
connorshea authored and vbrazo committed Sep 18, 2019
1 parent 15fc1e1 commit af00ffd
Show file tree
Hide file tree
Showing 29 changed files with 823 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
18 changes: 18 additions & 0 deletions lib/faker/default/appliance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions lib/faker/default/dessert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
54 changes: 54 additions & 0 deletions lib/faker/default/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions lib/faker/default/electrical_components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions lib/faker/default/greek_philosophers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 36 additions & 0 deletions lib/faker/default/industry_segments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions lib/faker/default/marketing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 45 additions & 0 deletions lib/faker/default/military.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions lib/faker/default/nato_phonetic_alphabet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit af00ffd

Please sign in to comment.