File: electrical_components.rb

package info (click to toggle)
ruby-faker 2.21.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,076 kB
  • sloc: ruby: 19,088; makefile: 6
file content (48 lines) | stat: -rw-r--r-- 1,067 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
# frozen_string_literal: true

module Faker
  class ElectricalComponents < Base
    flexible :electrical_components

    class << self
      ##
      # Produces an active electrical component.
      #
      # @return [String]
      #
      # @example
      #   Faker::ElectricalComponents.active #=> "Transistor"
      #
      # @faker.version 1.9.0
      def active
        fetch('electrical_components.active')
      end

      ##
      # Produces a passive electrical component.
      #
      # @return [String]
      #
      # @example
      #   Faker::ElectricalComponents.passive #=> "Resistor"
      #
      # @faker.version 1.9.0
      def passive
        fetch('electrical_components.passive')
      end

      ##
      # Produces an electromechanical electrical component.
      #
      # @return [String]
      #
      # @example
      #   Faker::ElectricalComponents.electromechanical #=> "Toggle Switch"
      #
      # @faker.version 1.9.0
      def electromechanical
        fetch('electrical_components.electromechanical')
      end
    end
  end
end