Module: FFaker::Movie

Extended by:
ModuleUtils, Movie
Included in:
Movie
Defined in:
lib/ffaker/movie.rb

Constant Summary collapse

SUFFIXES =
[
  'from Hell', 'from Outer Space', 'from Mars', 'from the Black Lagoon',
  'with a Thousand Faces', 'from Across the Ocean', 'Who Fell to Earth', 'That Came to Dinner'
].freeze
COLORS =
%w[Red Yellow Black White].freeze
RATINGS =

According to MPAA

%w[G PG PG-13 R NC-17].freeze

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, luhn_check, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#ratingObject



25
26
27
# File 'lib/ffaker/movie.rb', line 25

def rating
  fetch_sample(RATINGS)
end

#titleObject



16
17
18
19
20
21
22
23
# File 'lib/ffaker/movie.rb', line 16

def title
  case rand(0..3)
  when 0 then title_with_prefix
  when 1 then title_with_suffix
  when 2 then simple_title
  when 3 then title_from_formula
  end
end