class Faker::Movies::Tron
def character
-
(String)
-
def character sample(characters) end
def characters
def characters translate('faker.tron.characters').values.flatten end
def game
-
(String)
-
def game sample(games) end
def games
def games fetch_all('tron.games') end
def location
-
(String)
-
def location sample(locations) end
def locations
def locations fetch_all('tron.locations') end
def program
-
(String)
-
def program sample(programs) end
def programs
def programs fetch_all('tron.characters.programs') end
def quote(character: nil)
-
(String)
-
Parameters:
-
character
(String
) -- The name of a character to derive a quote from.
def quote(character: nil) quoted_characters = translate('faker.tron.quotes') if character.nil? character = sample(quoted_characters.keys).to_s else character = character.to_s.downcase # check alternate spellings, nicknames, titles of characters translate('faker.tron.alternate_character_spellings').each do |k, v| character = k.to_s if v.include?(character) end raise ArgumentError, "Character for quotes can be left blank or #{quoted_characters.keys.join(', ')}" unless quoted_characters.key?(character.to_sym) end fetch("tron.quotes.#{character}") end
def tagline
-
(String)
-
def tagline sample(taglines) end
def taglines
def taglines fetch_all('tron.taglines') end
def user
-
(String)
-
def user sample(users) end
def users
def users fetch_all('tron.characters.users') end
def vehicle
-
(String)
-
def vehicle sample(vehicles) end
def vehicles
def vehicles fetch_all('tron.vehicles') end