Sha256: 3672083ef8b50d560d2c70219aac0b2230bea1c9101bce0d2d760a6ed1f4bd69

Contents?: true

Size: 1.43 KB

Versions: 2

Compression:

Stored size: 1.43 KB

Contents

# frozen_string_literal: true

module Faker
  class Science < Base
    class << self
      ##
      # Produces the name of a element.
      #
      # @return [String]
      #
      # @example
      #   Faker::Science.element #=> "Carbon"
      #
      # @faker.version 1.8.5
      def element
        fetch('science.element')
      end

      ##
      # Produces the symbol of an element.
      #
      # @return [String]
      #
      # @example
      #   Faker::Science.element_symbol #=> "Pb"
      #
      # @faker.version 1.9.0
      def element_symbol
        fetch('science.element_symbol')
      end

      ##
      # Produces the state of an element.
      #
      # @return [String]
      #
      # @example
      #   Faker::Science.element_state #=> "Liquid"
      #
      # @faker.version next
      def element_state
        fetch('science.element_state')
      end

      ##
      # Produces the subcategory of an element.
      #
      # @return [String]
      #
      # @example
      #   Faker::Science.element_subcategory #=> "Reactive nonmetal"
      #
      # @faker.version next
      def element_subcategory
        fetch('science.element_subcategory')
      end

      ##
      # Produces the name of a scientist.
      #
      # @return [String]
      #
      # @example
      #   Faker::Science.scientist #=> "Isaac Newton"
      #
      # @faker.version 1.8.5
      def scientist
        fetch('science.scientist')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
logstash-output-scalyr-0.1.7 vendor/bundle/jruby/2.5.0/bundler/gems/faker-e1bd4a5a5777/lib/faker/default/science.rb
faker-2.18.0 lib/faker/default/science.rb