Class: PseudocodeGenerator::WritePseudo
- Inherits:
-
Object
- Object
- PseudocodeGenerator::WritePseudo
- Defined in:
- lib/pseudocode_generator.rb
Class Method Summary collapse
- .bedroom_script ⇒ Object
- .coffee_script ⇒ Object
- .conversation_script ⇒ Object
- .create_folder ⇒ Object
- .pizza_script ⇒ Object
Class Method Details
.bedroom_script ⇒ Object
19 20 21 22 23 24 25 |
# 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 ⇒ Object
11 12 13 14 15 16 17 |
# 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 ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# 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 ⇒ Object
7 8 9 |
# File 'lib/pseudocode_generator.rb', line 7 def self.create_folder system("mkdir pseudocode") end |
.pizza_script ⇒ Object
47 48 49 50 51 52 53 |
# 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 |