1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
# 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
|