Im bad at hashed lol


#1



module Commands

def director_commands 
	@command_1 = "Action!"
	@command_2 = "Quit on the set!"
	@command_3 = "Break"
	@command_4 = "Cut"
end

end

class Director
include Commands
attr_accessor :film_1, :film_2, :film_3, :name, :style
def initialize(name, style)
@name = name
@style = style
@film_list = {}
end

def signature
	print " #{:film_1}, #{:film_2}, #{:film_3} "
	puts "Here is #{name} signature films.\n "
	@film_list[film_1] = "original"
	@film_list[film_2] = "Sequel"
	@film_list[film_3] = "Second sequel"
	puts @film_list
end 

def add_movie 
loop do
	puts "Would you like to a movie (Yes/No)"
	answer1 = gets.chomp
	if answer1 == "yes"
	  puts "Please add a movie"
	  @movie = gets.chomp
	else
	break
	  puts @film_list[@movie] = nil 
	end
	puts "Any sequels? (Yes/No)"
	answer = gets.chomp 
	  case answer
		when "Yes", "yes","YES"
		puts "Enter sequel"
		sequel = gets.chomp
		@film_list[@movie]=sequel
		when "No","no","NO" then break
		end
	end
	end
end

michael_bay = Director.new("Michael", "Action")
puts michael_bay.director_commands[@command_1]
michael_bay.film_1 = "Transformers"
michael_bay.film_2 = "transformers2"
michael_bay.film_3 = "Transformers3"
michael_bay.signature
michael_bay.add_movie


Replace this line with your code. 



#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.