Sha256: 8c701efe7dcfd6fa30ceeb9ae5f5b3b459185268c2c48638049897d6e499b863

Contents?: true

Size: 1.37 KB

Versions: 37

Compression:

Stored size: 1.37 KB

Contents

# frozen_string_literal: true

module Faker
  class Superhero < Base
    class << self
      ##
      # Produces a superpower.
      #
      # @return [String]
      #
      # @example
      #   Faker::Superhero.power #=> "Photokinesis"
      #
      # @faker.version 1.6.2
      def power
        fetch('superhero.power')
      end

      ##
      # Produces a superhero name prefix.
      #
      # @return [String]
      #
      # @example
      #   Faker::Superhero.prefix #=> "the Fated"
      #
      # @faker.version 1.6.2
      def prefix
        fetch('superhero.prefix')
      end

      ##
      # Produces a superhero name suffix.
      #
      # @return [String]
      #
      # @example
      #   Faker::Superhero.suffix #=> "Captain"
      #
      # @faker.version 1.6.2
      def suffix
        fetch('superhero.suffix')
      end

      ##
      # Produces a superhero descriptor.
      #
      # @return [String]
      #
      # @example
      #   Faker::Superhero.descriptor #=> "Bizarro"
      #
      # @faker.version 1.6.2
      def descriptor
        fetch('superhero.descriptor')
      end

      ##
      # Produces a random superhero name.
      #
      # @return [String]
      #
      # @example
      #   Faker::Superhero.name #=> "Magnificent Shatterstar"
      #
      # @faker.version 1.6.2
      def name
        parse('superhero.name')
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 2 rubygems

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