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 YARD docs to Faker::SlackEmoji #1956

Merged
merged 3 commits into from May 17, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
81 changes: 81 additions & 0 deletions lib/faker/default/slack_emoji.rb
Expand Up @@ -3,38 +3,119 @@
module Faker
class SlackEmoji < Base
class << self
##
# Produces a random slack emoji from people category
Zeragamba marked this conversation as resolved.
Show resolved Hide resolved
#
# @return [String]
#
# @example
# Faker::SlackEmoji.people #=> ":sleepy:"
#
# @faker.version 1.5.0
def people
fetch('slack_emoji.people')
end

##
# Produces a random slack emoji from nature category
koic marked this conversation as resolved.
Show resolved Hide resolved
#
# @return [String]
#
# @example
# Faker::SlackEmoji.nature #=> ":mount_fuji:"
#
# @faker.version 1.5.0
def nature
fetch('slack_emoji.nature')
end

##
# Produces a random slack emoji from food and drink category
koic marked this conversation as resolved.
Show resolved Hide resolved
#
# @return [String]
#
# @example
# Faker::SlackEmoji.food_and_drink #=> ":beers:"
#
# @faker.version 1.5.0
def food_and_drink
fetch('slack_emoji.food_and_drink')
end

##
# Produces a random slack emoji from celebration category
koic marked this conversation as resolved.
Show resolved Hide resolved
#
# @return [String]
#
# @example
# Faker::SlackEmoji.celebration #=> ":tada:"
#
# @faker.version 1.5.0
def celebration
fetch('slack_emoji.celebration')
end

##
# Produces a random slack emoji from activity category
koic marked this conversation as resolved.
Show resolved Hide resolved
#
# @return [String]
#
# @example
# Faker::SlackEmoji.activity #=> ":soccer:"
#
# @faker.version 1.5.0
def activity
fetch('slack_emoji.activity')
end

##
# Produces a random slack emoji from travel and places category
koic marked this conversation as resolved.
Show resolved Hide resolved
#
# @return [String]
#
# @example
# Faker::SlackEmoji.travel_and_places #=> ":metro:"
#
# @faker.version 1.5.0
def travel_and_places
fetch('slack_emoji.travel_and_places')
end

##
# Produces a random slack emoji from objects and symbols category
koic marked this conversation as resolved.
Show resolved Hide resolved
#
# @return [String]
#
# @example
# Faker::SlackEmoji.objects_and_symbols #=> ":id:"
#
# @faker.version 1.5.0
def objects_and_symbols
fetch('slack_emoji.objects_and_symbols')
end

##
# Produces a random slack emoji from custom category
koic marked this conversation as resolved.
Show resolved Hide resolved
#
# @return [String]
#
# @example
# Faker::SlackEmoji.custom #=> ":slack:"
#
# @faker.version 1.5.0
def custom
fetch('slack_emoji.custom')
end

##
# Produces a random slack emoji from any category
koic marked this conversation as resolved.
Show resolved Hide resolved
#
# @return [String]
#
# @example
# Faker::SlackEmoji.emoji #=> ":pizza:"
#
# @faker.version 1.5.0
def emoji
parse('slack_emoji.emoji')
end
Expand Down