Module: PoolParty::Console
Instance Method Summary collapse
-
#load_pool(filename) ⇒ Object
Load a file that contains a pool into memory.
-
#reload! ⇒ Object
Clear all the pools and reload the console Call within console to reset and reload the entire poolparty base as well.
Methods included from Display
#available_bases, #header, #pool_describe, #subheader
Instance Method Details
#load_pool(filename) ⇒ Object
Load a file that contains a pool into memory
9 10 11 12 13 14 15 16 |
# File 'lib/poolparty/helpers/console.rb', line 9 def load_pool(filename) unless filename && ::File.file?(filename) puts "Could not load pool" exit else PoolParty::Script.inflate(open(filename).read, File.dirname(filename)) end end |
#reload! ⇒ Object
Clear all the pools and reload the console Call within console to reset and reload the entire poolparty base as well
21 22 23 |
# File 'lib/poolparty/helpers/console.rb', line 21 def reload! reset! end |