Skip to content

Instantly share code, notes, and snippets.

@maxehmookau
Created August 15, 2016 14:14
Show Gist options
  • Save maxehmookau/3078faa90506ca6e5c94e5a202326d42 to your computer and use it in GitHub Desktop.
Save maxehmookau/3078faa90506ca6e5c94e5a202326d42 to your computer and use it in GitHub Desktop.
class Film
attr_reader :title
def initialize(title)
@title = title
end
end
require_relative 'film'
films = [
Film.new('Harry Potter'),
Film.new('X-Men'),
Film.new('Finding Nemo')
]
puts "#{films.sample.title} and #{films.sample.title} are great films!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment