File: hobby.rb

package info (click to toggle)
ruby-faker 3.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,360 kB
  • sloc: ruby: 20,654; makefile: 6; sh: 6
file content (22 lines) | stat: -rw-r--r-- 376 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

module Faker
  class Hobby < Base
    flexible :hobby

    class << self
      ##
      # Retrieves a typical hobby activity.
      #
      # @return [String]
      #
      # @example
      #   Faker::Hobby.activity #=> "Cooking"
      #
      # @faker.version next
      def activity
        fetch('hobby.activity')
      end
    end
  end
end