Skip to content

Commit

Permalink
Plays and musicals (#1485)
Browse files Browse the repository at this point in the history
* 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
armandofox and Zeragamba authored May 17, 2020
1 parent 52488f2 commit 9140dce
Show file tree
Hide file tree
Showing 5 changed files with 1,035 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/unreleased/music/show.md
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"
```
49 changes: 49 additions & 0 deletions lib/faker/music/show.rb
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
Loading

0 comments on commit 9140dce

Please sign in to comment.