Sha256: 2a05d395eda68ede96eab5b2be99b6338d9bfbfb09fc6ad5f42c0f09a1599622

Contents?: true

Size: 834 Bytes

Versions: 32

Compression:

Stored size: 834 Bytes

Contents

# frozen_string_literal: true

module Faker
  class Currency < Base
    class << self
      ##
      # Produces the name of a currency.
      #
      # @return [String]
      #
      # @example
      #   Faker::Currency.name #=> "Swedish Krona"
      #
      # @faker.version 1.9.0
      def name
        fetch('currency.name')
      end

      ##
      # Produces a currency code.
      #
      # @return [String]
      #
      # @example
      #   Faker::Currency.code #=> "USD"
      #
      # @faker.version 1.9.0
      def code
        fetch('currency.code')
      end

      ##
      # Produces a currency symbol.
      #
      # @return [String]
      #
      # @example
      #   Faker::Currency.symbol #=> "$"
      #
      # @faker.version 1.9.0
      def symbol
        fetch('currency.symbol')
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

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