Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Faker::Volleyball #2178

Merged
merged 2 commits into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions doc/sports/volleyball.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Faker::Sports::Basketball

```ruby
Faker::Sports::Volleyball.team #=> "Leo Shoes Modena"

Faker::Sports::Volleyball.player #=> "Saeid Marouf"

Faker::Sports::Volleyball.coach #=> "Russ Rose"

Faker::Sports::Volleyball.position #=> "Middle blocker"

Faker::Sports::Volleyball.formation #=> "4-2"
```
74 changes: 74 additions & 0 deletions lib/faker/sports/volleyball.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# frozen_string_literal: true

module Faker
class Sports
class Volleyball < Base
class << self
##
# Produces the name of a volleyball team.
#
# @return [String]
#
# @example
# Faker::Sports::Volleyball.team #=> "Leo Shoes Modena"
#
# @faker.version next
def team
fetch('volleyball.team')
end

##
# Produces the name of a volleyball player.
#
# @return [String]
#
# @example
# Faker::Sports::Volleyball.player #=> "Saeid Marouf"
#
# @faker.version next
def player
fetch('volleyball.player')
end

##
# Produces the name of a volleyball coach.
#
# @return [String]
#
# @example
# Faker::Sports::Volleyball.coach #=> "Russ Rose"
#
# @faker.version next
def coach
fetch('volleyball.coach')
end

##
# Produces a position in volleyball.
#
# @return [String]
#
# @example
# Faker::Sports::Volleyball.position #=> "Middle blocker"
#
# @faker.version next
def position
fetch('volleyball.position')
end

##
# Produces a formation in volleyball.
#
# @return [String]
#
# @example
# Faker::Sports::Volleyball.formation #=> "4-2"
#
# @faker.version next
def formation
fetch('volleyball.formation')
end
end
end
end
end
Loading