class NPG::Project

Attributes

path[RW]

Public Class Methods

new(path = nil) click to toggle source
# File lib/runner.rb, line 5
def initialize(path = nil)
   self.path = path
end

Public Instance Methods

executable() click to toggle source
# File lib/runner.rb, line 20
def executable
   File.join(self.path, "Game.exe")
end
path=(val) click to toggle source
# File lib/runner.rb, line 9
def path=(val)
   val = File.expand_path val
   if FileTest.directory?(val)
      self.path = val
   elsif FileTest.file?(val)
      self.path = File.dirname(val)
   else
      raise Error::ENOENT, val
   end
end
run() click to toggle source
# File lib/runner.rb, line 24
def run
   system executable
end