Skip to content

Commit

Permalink
Add Faker::Emotion.word (#2324)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayqui committed Jun 22, 2021
1 parent c609855 commit 34b3f3c
Show file tree
Hide file tree
Showing 5 changed files with 537 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -161,6 +161,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
- [Faker::Drone](doc/drone/drone.md)
- [Faker::Educator](doc/default/educator.md)
- [Faker::ElectricalComponents](doc/default/electrical_components.md)
- [Faker::Emotion](doc/default/emotion.md)
- [Faker::Esport](doc/default/esport.md)
- [Faker::File](doc/default/file.md)
- [Faker::Fillmurray](doc/default/fillmurray.md)
Expand Down
6 changes: 6 additions & 0 deletions doc/default/emotion.md
@@ -0,0 +1,6 @@
# Faker::Emotion

```ruby
Faker::Emotion.noun #=> "euphoria"
Faker::Emotion.adjective #=> "chagrined"
```
33 changes: 33 additions & 0 deletions lib/faker/default/emotion.rb
@@ -0,0 +1,33 @@
# frozen_string_literal: true

module Faker
class Emotion < Base
class << self
##
# Produces an emotion noun.
#
# @return [String]
#
# @example
# Faker::Emotion.noun #=> "amazement"
#
# @faker.version next
def noun
fetch('emotion.noun')
end

##
# Produces an emotion adjective.
#
# @return [String]
#
# @example
# Faker::Emotion.adjective # => "nonplussed"
#
# @faker.version next
def adjective
fetch('emotion.adjective')
end
end
end
end

0 comments on commit 34b3f3c

Please sign in to comment.