module NaviBoot
Constants
- VERSION
Public Instance Methods
convert_int_to_array(num)
click to toggle source
# File lib/naviBoot.rb, line 16 def convert_int_to_array(num) @boot_nums = *(1..num.to_i) end
get_initial_count()
click to toggle source
# File lib/naviBoot.rb, line 7 def get_initial_count puts "The GEM will give you a random integer representing a Boot in breakout" puts "until there are no Boots left. The goal is to promote diversity in navigational" puts "interactions whilst livecoding for a group." puts print "How many boots are booting? :> " gets.chomp end
print_rando_int()
click to toggle source
# File lib/naviBoot.rb, line 20 def print_rando_int puts @boot_nums.shuffle!.pop end
rerun?()
click to toggle source
# File lib/naviBoot.rb, line 24 def rerun? print "ENTER to exit, any other key to loop through again. :> " input = gets.chomp return true unless input == "" false end
runner()
click to toggle source
# File lib/naviBoot.rb, line 31 def runner convert_int_to_array(get_initial_count) puts "ENTER for next Boot" print_rando_int until @boot_nums.length == 0 gets.chomp print_rando_int end runner if rerun? end