Skip to content

Commit

Permalink
add YARD doc for Faker::Coin (faker-ruby#1803)
Browse files Browse the repository at this point in the history
* add coin docs

* Update lib/faker/default/coin.rb

Co-Authored-By: Connor Shea <connor.james.shea@gmail.com>

* Update lib/faker/default/coin.rb

Co-Authored-By: Connor Shea <connor.james.shea@gmail.com>
  • Loading branch information
2 people authored and michebble committed Feb 16, 2020
1 parent bd6d58a commit b609fab
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/faker/default/coin.rb
Expand Up @@ -3,10 +3,28 @@
module Faker
class Coin < Base
class << self
##
# Retrieves a random coin from any country.
#
# @return [String]
#
# @example
# Faker::Coin.name #=> "Brazilian Real"
#
# @faker.version 1.9.2
def name
fetch('currency.name')
end

##
# Retrieves a face to a flipped coin
#
# @return [String]
#
# @example
# Faker::Coin.flip #=> "Heads"
#
# @faker.version 1.9.2
def flip
fetch('coin.flip')
end
Expand Down

0 comments on commit b609fab

Please sign in to comment.