Class: Faker::Movies::Tron
Constant Summary
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.character ⇒ String
Produces a character from Tron.
- .characters ⇒ Object
-
.game ⇒ String
Produces a game from Tron.
- .games ⇒ Object
-
.location ⇒ String
Produces a location from Tron.
- .locations ⇒ Object
-
.program ⇒ String
Produces a program from Tron.
- .programs ⇒ Object
-
.quote(character: nil) ⇒ String
Produces a quote from Tron.
-
.tagline ⇒ String
Produces a tagline from Tron.
- .taglines ⇒ Object
-
.user ⇒ String
Produces a user from Tron.
- .users ⇒ Object
-
.vehicle ⇒ String
Produces a vehicle from Tron.
- .vehicles ⇒ Object
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, shuffle!, translate, unique, with_locale
Class Method Details
.character ⇒ String
Produces a character from Tron.
16 17 18 |
# File 'lib/faker/movies/tron.rb', line 16 def character sample(characters) end |
.characters ⇒ Object
131 132 133 |
# File 'lib/faker/movies/tron.rb', line 131 def characters translate('faker.tron.characters').values.flatten end |
.game ⇒ String
Produces a game from Tron.
29 30 31 |
# File 'lib/faker/movies/tron.rb', line 29 def game sample(games) end |
.games ⇒ Object
135 136 137 |
# File 'lib/faker/movies/tron.rb', line 135 def games fetch_all('tron.games') end |
.location ⇒ String
Produces a location from Tron.
42 43 44 |
# File 'lib/faker/movies/tron.rb', line 42 def location sample(locations) end |
.locations ⇒ Object
139 140 141 |
# File 'lib/faker/movies/tron.rb', line 139 def locations fetch_all('tron.locations') end |
.program ⇒ String
Produces a program from Tron.
55 56 57 |
# File 'lib/faker/movies/tron.rb', line 55 def program sample(programs) end |
.programs ⇒ Object
143 144 145 |
# File 'lib/faker/movies/tron.rb', line 143 def programs fetch_all('tron.characters.programs') end |
.quote(character: nil) ⇒ String
Produces a quote from Tron.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/faker/movies/tron.rb', line 73 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 |
.tagline ⇒ String
Produces a tagline from Tron.
101 102 103 |
# File 'lib/faker/movies/tron.rb', line 101 def tagline sample(taglines) end |
.taglines ⇒ Object
147 148 149 |
# File 'lib/faker/movies/tron.rb', line 147 def taglines fetch_all('tron.taglines') end |
.user ⇒ String
Produces a user from Tron.
114 115 116 |
# File 'lib/faker/movies/tron.rb', line 114 def user sample(users) end |
.users ⇒ Object
151 152 153 |
# File 'lib/faker/movies/tron.rb', line 151 def users fetch_all('tron.characters.users') end |
.vehicle ⇒ String
Produces a vehicle from Tron.
127 128 129 |
# File 'lib/faker/movies/tron.rb', line 127 def vehicle sample(vehicles) end |
.vehicles ⇒ Object
155 156 157 |
# File 'lib/faker/movies/tron.rb', line 155 def vehicles fetch_all('tron.vehicles') end |