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 doc for Faker::Job #1797

Merged
merged 2 commits into from
Dec 8, 2019
Merged
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
36 changes: 36 additions & 0 deletions lib/faker/default/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,54 @@ class Job < Base
flexible :job

class << self
##
# Produces a random job title.
#
# @return [String]
#
# @example
# Faker::Job.title #=> "Construction Manager"
#
# @faker.version 1.7.0
def title
parse('job.title')
end

##
# Produces a random job position.
#
# @return [String]
#
# @example
# Faker::Job.position #=> "Strategist"
#
# @faker.version 1.8.7
def position
fetch('job.position')
end

##
# Produces a random job field.
#
# @return [String]
#
# @example
# Faker::Job.field #=> "Banking"
#
# @faker.version 1.7.0
def field
fetch('job.field')
end

##
# Produces a random job skill.
#
# @return [String]
#
# @example
# Faker::Job.key_skill #=> "Leadership"
#
# @faker.version 1.7.0
def key_skill
fetch('job.key_skills')
end
Expand Down