Class: NetLinx::Rake::Compile
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- NetLinx::Rake::Compile
- Defined in:
- lib/netlinx/rake/compile/compile.rb
Overview
Compile to deployable code from the source code files in the given workspace.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name = :compile) {|_self| ... } ⇒ Compile
constructor
A new instance of Compile.
Constructor Details
#initialize(name = :compile) {|_self| ... } ⇒ Compile
Returns a new instance of Compile.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/netlinx/rake/compile/compile.rb', line 15 def initialize name = :compile @name = name yield self if block_given? desc "Compile to deployable code from the source code files in the given workspace." task(name) do workspace = Dir.glob("*.apw").first puts "\n\nLaunching NetLinx compiler...\n\n" # TODO: Invoke compiler through API. # Just call the netlinx-compile rake task in rake/erb. system "netlinx-compile --smart -s \"#{workspace}\"" # NetLinx::Compile::Script.run argv: ['--smart', '-s', "\"#{workspace}\""] end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/netlinx/rake/compile/compile.rb', line 13 def name @name end |