Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main
- [Faker::Games::Dota](doc/games/dota.md)
- [Faker::Games::ElderScrolls](doc/games/elder_scrolls.md)
- [Faker::Games::Fallout](doc/games/fallout.md)
- [Faker::Games::FinalFantasyXIV](doc/games/final_fantasy_xiv.md)
- [Faker::Games::HalfLife](doc/games/half_life.md)
- [Faker::Games::Heroes](doc/games/heroes.md)
- [Faker::Games::HeroesOfTheStorm](doc/games/heroes_of_the_storm.md)
Expand Down
18 changes: 18 additions & 0 deletions doc/games/final_fantasy_xiv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Faker::Games::FinalFantasyXIV

```ruby
# Generate a random character from Final Fantasy XIV
Faker::Games::FinalFantasyXIV.character #=> "Y'shtola Rhul"

# Generate a random job name from Final Fantasy XIV
Faker::Games::FinalFantasyXIV.job #=> "Paladin"

# Generate a random race name from Final Fantasy XIV
Faker::Games::FinalFantasyXIV.race #=> "Miqo'te"

# Generate a random data center from Final Fantasy XIV
Faker::Games::FinalFantasyXIV.data_center #=> "Aether"

# Generate a random zone from Final Fantasy XIV
Faker::Games::FinalFantasyXIV.zone #=> "Eastern La Noscea"
```
73 changes: 73 additions & 0 deletions lib/faker/games/final_fantasy_xiv.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# frozen_string_literal: true

module Faker
class Games
class FinalFantasyXIV < Base
class << self
##
# Produces the name of a character from FFXIV.
#
# @return [String]
#
# @example
# Faker::Games::FinalFantasyXIV.character #=> "Y'shtola Rhul"
#
# @faker.version next
def character
fetch('games.final_fantasy_xiv.characters')
end

##
# Produces a job name from Final Fantasy XIV. Either a battle or non-battle playable job.
#
# @return [String]
#
# @example
# Faker::Games::FinalFantasyXIV.job #=> "Paladin"
#
# @faker.version next
def job
fetch('games.final_fantasy_xiv.jobs')
end

# Produces the name of a playable race from Final Fantasy XIV.
#
# @return [String]
#
# @example
# Faker::Games::FinalFantasyXIV.race #=> "Miqo'te"
#
# @faker.version next
def race
fetch('games.final_fantasy_xiv.races')
end

##
# Produces a data center from Final Fantasy XIV.
#
# @return [String]
#
# @example
# Faker::Games::FinalFantasyXIV.data_center #=> "Aether"
#
# @faker.version next
def data_center
fetch('games.final_fantasy_xiv.data_centers')
end

##
# Produces a geographical zone from Final Fantasy XIV.
#
# @return [String]
#
# @example
# Faker::Games::FinalFantasyXIV.zone #=> "Eastern La Noscea"
#
# @faker.version next
def zone
fetch('games.final_fantasy_xiv.zones')
end
end
end
end
end
Loading