Class: MRuby::Command::Gperf
- Inherits:
-
MRuby::Command
- Object
- MRuby::Command
- MRuby::Command::Gperf
- Defined in:
- ext/enterprise_script_service/mruby/lib/mruby/build/command.rb
Instance Attribute Summary collapse
-
#compile_options ⇒ Object
Returns the value of attribute compile_options.
Attributes inherited from MRuby::Command
Instance Method Summary collapse
-
#initialize(build) ⇒ Gperf
constructor
A new instance of Gperf.
- #run(outfile, infile) ⇒ Object
Methods inherited from MRuby::Command
Constructor Details
#initialize(build) ⇒ Gperf
Returns a new instance of Gperf.
260 261 262 263 264 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build/command.rb', line 260 def initialize(build) super @command = 'gperf' @compile_options = %q[-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" "%{infile}" > "%{outfile}"] end |
Instance Attribute Details
#compile_options ⇒ Object
Returns the value of attribute compile_options.
258 259 260 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build/command.rb', line 258 def @compile_options end |
Instance Method Details
#run(outfile, infile) ⇒ Object
266 267 268 269 270 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build/command.rb', line 266 def run(outfile, infile) mkdir_p File.dirname(outfile) _pp "GPERF", infile.relative_path, outfile.relative_path _run , { :outfile => filename(outfile) , :infile => filename(infile) } end |