Class: Gamefic::Sdk::Shell::Test
- Inherits:
-
Object
- Object
- Gamefic::Sdk::Shell::Test
- Defined in:
- lib/gamefic-sdk/shell/test.rb
Instance Method Summary collapse
-
#initialize(directory:) ⇒ Test
constructor
A new instance of Test.
- #run ⇒ Object
Constructor Details
#initialize(directory:) ⇒ Test
Returns a new instance of Test.
8 9 10 11 12 |
# File 'lib/gamefic-sdk/shell/test.rb', line 8 def initialize(directory:) @path = directory raise "Invalid path: #{@path}" unless File.exist?(@path) puts "Loading..." end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/gamefic-sdk/shell/test.rb', line 14 def run paths = config_path.script_paths + [Gamefic::Sdk::GLOBAL_SCRIPT_PATH] plot = Gamefic::Sdk::Debug::Plot.new Source::File.new(*paths) plot.script 'main' plot.script 'debug' engine = Engine::Tty.new plot engine.connect puts "\n" engine.run end |