Class: Faker::StarWars

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/star_wars.rb

Constant Summary

Constants inherited from Base

Base::Letters, Base::Numbers, Base::ULetters

Class Method Summary collapse

Methods inherited from Base

bothify, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, sample, shuffle, translate, unique, with_locale

Class Method Details

.characterObject


4
5
6
# File 'lib/faker/star_wars.rb', line 4

def character
  sample(characters)
end

.charactersObject


36
37
38
39
40
# File 'lib/faker/star_wars.rb', line 36

def characters
  ['Padme Amidala', 'Jar Jar Binks', 'Borvo the Hutt', 'Darth Caedus', 'Boba Fett', 'Jabba the Hutt', 'Obi-Wan Kenobi', 'Darth Maul', 'Leia Organa', 'Sheev Palpatine',
   'Kylo Ren', 'Darth Sidious', 'Anakin Skywalker', 'Luke Skywalker', 'Ben Solo', 'Han Solo', 'Darth Vader', 'Watto', 'Mace Windu', 'Yoda', 'Count Dooku', 'Sebulba',
   'Qui-Gon Jinn', 'Chewbacca', 'Jango Fett', 'Lando Calrissian', 'Bail Organa', 'Wedge Antilles', 'Poe Dameron', 'Ki-Adi-Mundi', 'Nute Gunray', 'Panaka', 'Rune Haako']
end

.droidObject


8
9
10
# File 'lib/faker/star_wars.rb', line 8

def droid
  sample(droids)
end

.droidsObject


42
43
44
45
# File 'lib/faker/star_wars.rb', line 42

def droids
  ['2-1B', '4-LOM', 'ASP', 'B2-RP', 'B1', 'BD-3000', 'FA-4', 'GH-7', 'GNK', 'LM-432', 'ID9', '11-4D', '2-1B', '327-T', '4-LOM', 'B4-D4',
   'NR-N99', 'C-3PO', 'R2-D2', 'BB-8', 'R2-Q5']
end

.planetObject


12
13
14
# File 'lib/faker/star_wars.rb', line 12

def planet
  sample(planets)
end

.planetsObject


47
48
49
50
51
# File 'lib/faker/star_wars.rb', line 47

def planets
  ['Alderaan', 'Bespin', 'Coruscant', 'DQar', 'Dagobah', 'Endor', 'Geonosis', 'Hoth',
    'Hosnian Prime',  'Jakku', 'Kamino', 'Kashyyyk', 'Lothal', 'Mustafar', 'Naboo',
    'Sullust', 'Takodana', 'Tatooine', 'Utapau', 'Yavin']
end

.quoteObject


16
17
18
# File 'lib/faker/star_wars.rb', line 16

def quote
  sample(quotes)
end

.quotesObject


53
54
55
56
57
58
59
60
61
62
63
# File 'lib/faker/star_wars.rb', line 53

def quotes
  ["Never tell me the odds!", "Well, you said you wanted to be around when I made a mistake.", "You will never find a more wretched hive of scum and villainy. We must be cautious.", "Wars not make one great.",
   "You do have your moments. Not many, but you have them.", "Now, witness the power of this fully operational battle station.", "No reward is worth this.", "Shut him up or shut him down.",
   "I have a bad feeling about this.", "Who\'s the more foolish; the fool, or the fool who follows him?", "Would somebody get this big walking carpet out of my way?", "I find your lack of faith disturbing.",
   "If they follow standard Imperial procedure, they\'ll dump their garbage before they go to light-speed.", "Only at the end do you realize the power of the Dark Side.", "Bounty hunters! We don\'t need this scum.",
   "It\'s not impossible. I used to bullseye womp rats in my T-16 back home, they\'re not much bigger than two meters.", "Strike me down, and I will become more powerful than you could possibly imagine.",
   "You know, that little droid is going to cause me a lot of trouble.", "If you\'re saying that coming here was a bad idea, I\'m starting to agree with you.", "You\'ll find I\'m full of surprises!",
   "Aren\'t you a little short for a Stormtrooper?", "You are unwise to lower your defenses!", "R2-D2, you know better than to trust a strange computer!", "Truly wonderful, the mind of a child is.",
   "That is why you fail.", "A Jedi uses the Force for knowledge and defense, never for attack.", "Adventure. Excitement. A Jedi craves not these things.", "Judge me by my size, do you?",
   "Fear is the path to the dark side... fear leads to anger... anger leads to hate... hate leads to suffering.", "Do. Or do not. There is no try."]
end

.specieObject


20
21
22
# File 'lib/faker/star_wars.rb', line 20

def specie
  sample(species)
end

.speciesObject


65
66
67
# File 'lib/faker/star_wars.rb', line 65

def species
  ['Ewok', 'Hutt', 'Gungan', 'Ithorian', 'Jawa', 'Neimoidian', 'Sullustan', 'Wookiee', 'Mon Calamari']
end

.vehicleObject


24
25
26
# File 'lib/faker/star_wars.rb', line 24

def vehicle
  sample(vehicles)
end

.vehiclesObject


69
70
71
72
# File 'lib/faker/star_wars.rb', line 69

def vehicles
  ['V-Wing Fighter', 'ATT Battle Tank', 'Naboo N-1 Starfighter', 'Vulture Droid', 'Republic Cruiser', 'Naboo Royal Starship', 'Gungan Bongo Submarine', 'Flash Speeder', 'Trade Federation Battleship', 'Millennium Falcon',
   'Sith Infiltrator', 'AT-ST Walker', 'TIE Bomber', 'Imperial Shuttle', 'Sandcrawler', 'TIE Interceptor', 'Speeder Bike', 'Death Star', 'AT-AT Walker', 'Imperial Star Destroyer', 'X-Wing Fighter']
end

.wookiee_sentenceObject Also known as: wookie_sentence


28
29
30
31
32
33
34
# File 'lib/faker/star_wars.rb', line 28

def wookiee_sentence
  sentence = sample(wookiee_words).capitalize

  rand(0..10).times { sentence += " " + sample(wookiee_words)}

  sentence + sample(['.','?','!'])
end

.wookiee_wordsObject Also known as: wookie_words


74
75
76
77
# File 'lib/faker/star_wars.rb', line 74

def wookiee_words
  ['wyaaaaaa', 'ruh', 'huewaa', 'muaa', 'mumwa', 'wua', 'ga', 'ma', 'ahuma', 'ooma', 'youw', 'kabukk', 'wyogg',
    'gwyaaaag', 'roooarrgh', 'ur', 'ru', 'roo', 'hnn-rowr', 'yrroonn', 'nng', 'rarr']
end