File: educator.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 (102 lines) | stat: -rw-r--r-- 2,089 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# frozen_string_literal: true

module Faker
  class Educator < Base
    flexible :educator

    class << self
      ##
      # Produces a university name.
      #
      # @return [String]
      #
      # @example
      #   Faker::Educator.university #=> "Mallowtown Technical College"
      #
      # @faker.version 1.6.4
      def university
        parse('educator.university')
      end

      ##
      # Produces a university degree.
      #
      # @return [String]
      #
      # @example
      #   Faker::Educator.degree #=> "Associate Degree in Criminology"
      #
      # @faker.version 1.9.2
      def degree
        parse('educator.degree')
      end

      alias course degree

      ##
      # Produces a university subject.
      #
      # @return [String]
      #
      # @example
      #   Faker::Educator.subject #=> "Criminology"
      #
      # @faker.version 1.9.2
      def subject
        fetch('educator.subject')
      end

      ##
      # Produces a course name.
      #
      # @return [String]
      #
      # @example
      #   Faker::Educator.course_name #=> "Criminology 101"
      #
      # @faker.version 1.9.2
      def course_name
        numerify(parse('educator.course_name'))
      end

      ##
      # Produces a secondary school.
      #
      # @return [String]
      #
      # @example
      #   Faker::Educator.secondary_school #=> "Iceborough Secondary College"
      #
      # @faker.version 1.6.4
      def secondary_school
        parse('educator.secondary_school')
      end

      ##
      # Produces a primary school.
      #
      # @return [String]
      #
      # @example
      #   Faker::Educator.primary_school #=> "Brighthurst Elementary School"
      #
      # @faker.version next
      def primary_school
        parse('educator.primary_school')
      end

      ##
      # Produces a campus name.
      #
      # @return [String]
      #
      # @example
      #   Faker::Educator.campus #=> "Vertapple Campus"
      #
      # @faker.version 1.6.4
      def campus
        parse('educator.campus')
      end
    end
  end
end