Class: MRuby::Command::Yacc
- Inherits:
-
MRuby::Command
- Object
- MRuby::Command
- MRuby::Command::Yacc
- 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) ⇒ Yacc
constructor
A new instance of Yacc.
- #run(outfile, infile) ⇒ Object
Methods inherited from MRuby::Command
Constructor Details
#initialize(build) ⇒ Yacc
Returns a new instance of Yacc.
244 245 246 247 248 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build/command.rb', line 244 def initialize(build) super @command = 'bison' @compile_options = %q[-o "%{outfile}" "%{infile}"] end |
Instance Attribute Details
#compile_options ⇒ Object
Returns the value of attribute compile_options.
242 243 244 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build/command.rb', line 242 def @compile_options end |
Instance Method Details
#run(outfile, infile) ⇒ Object
250 251 252 253 254 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build/command.rb', line 250 def run(outfile, infile) mkdir_p File.dirname(outfile) _pp "YACC", infile.relative_path, outfile.relative_path _run , { :outfile => filename(outfile) , :infile => filename(infile) } end |