Class: Polytrix::Executors::LinuxChallengeRunner

Inherits:
ChallengeRunner
  • Object
show all
Includes:
Util::FileSystem
Defined in:
lib/polytrix/executors/linux_challenge_executor.rb

Instance Attribute Summary

Attributes included from Polytrix::Executor

#env, #executor

Instance Method Summary collapse

Methods included from Util::FileSystem

#find_file, #relativize

Methods included from Util::String

included

Methods included from Util::String::ClassMethods

#ansi2html, #escape_html, #highlight, #slugify

Methods inherited from ChallengeRunner

create_runner, #run_challenge, #run_command

Methods included from Polytrix::Executor

#execute

Instance Method Details

#challenge_command(challenge_script, basedir = Dir.pwd) ⇒ Object



6
7
8
9
10
# File 'lib/polytrix/executors/linux_challenge_executor.rb', line 6

def challenge_command(challenge_script, basedir = Dir.pwd)
  challenge_script = "./#{challenge_script}" unless challenge_script.to_s.start_with? '/'

  [wrapper_script(basedir), challenge_script].compact.join(' ')
end