-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding task for shows and musicals * fixed syntax errors in show.yml and modified show.rb and tests accordingly * Fixed Rubocop errors and moved test file into a subdirectory to follow new test file conventions * wrap Show in Faker::Music * update unreleased_README.md and shows.md docfile * update unreleased_README and doc/unreleased/music/show.rb with proper singularization * Update lib/faker/music/show.rb Co-authored-by: Stephen A. Wilson <stephen-356@hotmail.com> Co-authored-by: Stephen A. Wilson <stephen-356@hotmail.com>
- Loading branch information
1 parent
52488f2
commit 9140dce
Showing
5 changed files
with
1,035 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Faker::Music::Show | ||
|
||
```ruby | ||
Faker::Music::Show.adult_musical # => "West Side Story" | ||
Faker::Music::Show.kids_musical # => "Into the Woods JR." | ||
Faker::Music::Show.play # => "Death of a Salesman" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
class Show < Base | ||
class << self | ||
## | ||
# Produces the name of a musical for an older audience | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Alphanumeric.alpha | ||
# #=> "West Side Story" | ||
# | ||
# @faker.version next | ||
def adult_musical | ||
fetch('show.adult_musical') | ||
end | ||
|
||
## | ||
# Produces the name of a musical for a younger audience | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Alphanumeric.alpha | ||
# #=> "Into the Woods JR." | ||
# | ||
# @faker.version next | ||
def kids_musical | ||
fetch('show.kids_musical') | ||
end | ||
|
||
## | ||
# Produces the name of a play | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Alphanumeric.alpha | ||
# #=> "Death of a Salesman" | ||
# | ||
# @faker.version next | ||
def play | ||
fetch('show.play') | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.