class PseudocodeGenerator::WritePseudo
Public Class Methods
bedroom_script()
click to toggle source
# File lib/pseudocode_generator.rb, line 19 def self.bedroom_script puts "Generating bedroom script..." open("pseudocode/bedroom_pseudocode.txt", "w") { |f| f.puts '"#{bot_name}: An animal is sleeping on top of me in my bed. My #{pet} is the only animal in this #{house}. Therefore, my #{pet} is the animal sleeping on me."' } end
coffee_script()
click to toggle source
# File lib/pseudocode_generator.rb, line 11 def self.coffee_script puts "Generating coffee script..." open("pseudocode/coffee_pseudocode.txt", "w") { |f| f.puts '"#{bot_name}: I want #{coffee_roast} #{coffee_strength} at #{coffee_temp}."' } end
conversation_script()
click to toggle source
# File lib/pseudocode_generator.rb, line 27 def self.conversation_script puts "Generating request script..." open("pseudocode/request_pseudocode.txt", "w") { |f| f.puts '"#{bot_name}: #{greeting} #{agent} #{request} #{item} #{for_from} #{user_location}"' } puts "Generating chatbot script..." open("pseudocode/chatbot_pseudocode.txt", "w") { |f| f.puts '"#{bot_name}: I have a #{bot_pet}. Do you have a #{bot_pet}? >> "' f.puts '"#{bot_name}: I am #{bot_age}, how old are you? >> "' f.puts '"#{bot_name}: I am #{bot_height} height, how tall are you? >> "' f.puts '"#{bot_name}: I weigh #{bot_weight} pounds, how much do you weigh? >> "' f.puts '"#{bot_name}: I have a pet #{bot_name}, do you have any pets? >> "' f.puts '"#{bot_name}: I work as a #{bot_job}, what do you do for a living? >> "' f.puts '"#{bot_name}: It chilly, with a slight fan blowing. Whats the weather like? >> "' } end
create_folder()
click to toggle source
# File lib/pseudocode_generator.rb, line 7 def self.create_folder system("mkdir pseudocode") end
pizza_script()
click to toggle source
# File lib/pseudocode_generator.rb, line 47 def self.pizza_script puts "Generating pizza script..." open("pseudocode/pizza_pseudocode.txt", "w") { |f| f.puts '"#{bot_name}: I will have a #{pizza_size} pizza with #{pizza_toppings} #{pizza_style}."' } end