Sha256: 6b9138f10535be3031cceaaeb6283b2d8b4a92e95119fc7ee68fb944197bea3d

Contents?: true

Size: 1.3 KB

Versions: 32

Compression:

Stored size: 1.3 KB

Contents

# frozen_string_literal: true

module Faker
  class Team < Base
    flexible :team

    class << self
      ##
      # Produces a team name from a state and a creature.
      #
      # @return [String]
      #
      # @example
      #   Faker::Team.name #=> "Oregon vixens"
      #
      # @faker.version 1.3.0
      def name
        parse('team.name')
      end

      ##
      # Produces a team creature.
      #
      # @return [String]
      #
      # @example
      #   Faker::Team.creature #=> "geese"
      #
      # @faker.version 1.3.0
      def creature
        fetch('team.creature')
      end

      ##
      # Produces a team state.
      #
      # @return [String]
      #
      # @example
      #   Faker::Team.state #=> "Oregon"
      #
      # @faker.version 1.3.0
      def state
        fetch('address.state')
      end

      ##
      # Produces a team sport.
      #
      # @return [String]
      #
      # @example
      #   Faker::Team.sport #=> "Lacrosse"
      #
      # @faker.version 1.5.0
      def sport
        fetch('team.sport')
      end

      ##
      # Produces the name of a team mascot.
      #
      # @return [String]
      #
      # @example
      #   Faker::Team.mascot #=> "Hugo"
      #
      # @faker.version 1.8.1
      def mascot
        fetch('team.mascot')
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
faker-3.5.1 lib/faker/default/team.rb
faker-3.4.2 lib/faker/default/team.rb
faker-3.4.1 lib/faker/default/team.rb
faker-3.3.1 lib/faker/default/team.rb
faker-3.3.0 lib/faker/default/team.rb
faker-3.2.3 lib/faker/default/team.rb
faker-3.2.2 lib/faker/default/team.rb
faker-3.2.1 lib/faker/default/team.rb
faker-3.2.0 lib/faker/default/team.rb
faker-3.1.1 lib/faker/default/team.rb
faker-3.1.0 lib/faker/default/team.rb
faker-3.0.0 lib/faker/default/team.rb
faker-2.23.0 lib/faker/default/team.rb
faker-2.22.0 lib/faker/default/team.rb
faker-2.21.0 lib/faker/default/team.rb
faker-2.20.0 lib/faker/default/team.rb
faker-2.19.0 lib/faker/default/team.rb
logstash-output-scalyr-0.1.7 vendor/bundle/jruby/2.5.0/bundler/gems/faker-e1bd4a5a5777/lib/faker/default/team.rb
faker-2.18.0 lib/faker/default/team.rb
faker-2.17.0 lib/faker/default/team.rb