Module: Haxe::Cli::Proxy::Command
- Defined in:
- lib/haxe/cli/proxy/command.rb
Defined Under Namespace
Classes: Result
Constant Summary collapse
- HAXE =
::Haxe::Cli::Proxy::Constants::HAXE
Class Method Summary collapse
-
.compile(options) ⇒ ::Haxe::Cli::Command::Result
Execute haxe compile command.
-
.exists? ⇒ boolean
Check whether command
haxeexists. -
.help ⇒ ::Haxe::Cli::Command::Result
Execute command ‘haxe -help`.
-
.lib(lib_name, version = nil) ⇒ ::Haxe::Cli::Command::Result
Execute command ‘haxe -lib [lib_name]:`.
-
.xml(file) ⇒ ::Haxe::Cli::Command::Result
Execute command ‘haxe -xml [file]`.
Class Method Details
.compile(options) ⇒ ::Haxe::Cli::Command::Result
Execute haxe compile command.
78 79 80 81 |
# File 'lib/haxe/cli/proxy/command.rb', line 78 def compile() builder = ::Haxe::Cli::Proxy::CompileOption::Builder.new() execute "#{HAXE} #{builder}" end |
.exists? ⇒ boolean
Check whether command haxe exists.
15 16 17 18 19 20 21 |
# File 'lib/haxe/cli/proxy/command.rb', line 15 def exists? if RUBY_PLATFORM.downcase =~ /mswin(?!ce)|mingw|cygwin|bccwin/ system "where #{HAXE} > nul" else system "hash #{HAXE} 2> /dev/null" end end |
.help ⇒ ::Haxe::Cli::Command::Result
Execute command ‘haxe -help`
28 29 30 31 |
# File 'lib/haxe/cli/proxy/command.rb', line 28 def help help = ::Haxe::Cli::Proxy::Constants::OPTION_HELP execute "#{HAXE} #{help}" end |
.lib(lib_name, version = nil) ⇒ ::Haxe::Cli::Command::Result
Execute command ‘haxe -lib [lib_name]:`
40 41 42 43 44 |
# File 'lib/haxe/cli/proxy/command.rb', line 40 def lib(lib_name, version=nil) lib = ::Haxe::Cli::Proxy::Constants::OPTION_LIB lib_name << ":#{version}" unless version.nil? execute "#{HAXE} #{lib} #{lib_name}" end |
.xml(file) ⇒ ::Haxe::Cli::Command::Result
Execute command ‘haxe -xml [file]`
52 53 54 55 |
# File 'lib/haxe/cli/proxy/command.rb', line 52 def xml(file) xml = ::Haxe::Cli::Proxy::Constants::OPTION_XML execute "#{HAXE} #{xml} #{file}" end |