Sha256: 35d4c99f2ec439d6a6ebd52e276620a897db21aa423f41a9785cc6b2f67b84d3

Contents?: true

Size: 1.42 KB

Versions: 14

Compression:

Stored size: 1.42 KB

Contents

# frozen_string_literal: true

module Faker
  class Movies
    class Hobbit < Base
      class << self
        ##
        # Produces the name of a character from The Hobbit.
        #
        # @return [String]
        #
        # @example
        #   Faker::Movies::Hobbit.character #=> "Gandalf the Grey"
        #
        # @faker.version 1.8.0
        def character
          fetch('hobbit.character')
        end

        ##
        # Produces the name of one of the 13 dwarves from the Company, or Gandalf or Bilbo.
        #
        # @return [String]
        #
        # @example
        #   Faker::Movies::Hobbit.thorins_company #=> "Thorin Oakenshield"
        #
        # @faker.version 1.8.0
        def thorins_company
          fetch('hobbit.thorins_company')
        end

        ##
        # Produces a quote from The Hobbit.
        #
        # @return [String]
        #
        # @example
        #   Faker::Movies::Hobbit.quote
        #     #=> "Never laugh at live dragons, Bilbo you fool!"
        #
        # @faker.version 1.8.0
        def quote
          fetch('hobbit.quote')
        end

        ##
        # Produces the name of a location from The Hobbit.
        #
        # @return [String]
        #
        # @example
        #   Faker::Movies::Hobbit.location #=> "The Shire"
        #
        # @faker.version 1.8.0
        def location
          fetch('hobbit.location')
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
faker-2.14.0 lib/faker/movies/hobbit.rb
faker-2.13.0 lib/faker/movies/hobbit.rb
faker-2.12.0 lib/faker/movies/hobbit.rb
faker-2.11.0 lib/faker/movies/hobbit.rb
faker-2.10.2 lib/faker/movies/hobbit.rb
faker-2.10.1 lib/faker/movies/hobbit.rb
faker-2.10.0 lib/faker/movies/hobbit.rb
faker-2.9.0 lib/faker/movies/hobbit.rb
faker-2.8.1 lib/faker/movies/hobbit.rb
faker-2.8.0 lib/faker/movies/hobbit.rb
faker-2.7.0 lib/faker/movies/hobbit.rb
faker-2.6.0 lib/faker/movies/hobbit.rb
faker-2.5.0 lib/faker/movies/hobbit.rb
faker-2.4.0 lib/faker/movies/hobbit.rb