Exemple #1
0
 public function scanRuby($short = false)
 {
     $rubyScanner = new RubyScanner($this->string());
     $rubyScanner->rails = true;
     $rubyScanner->init();
     $rubyScanner->pos($this->pos());
     $rubyScanner->main();
     $this->record($rubyScanner->tagged(), $short ? 'INTERPOLATION' : null, true);
     $this->pos($rubyScanner->pos());
 }
Exemple #2
0
 protected function interpolate()
 {
     $interpolationScanner = new RubyScanner();
     $interpolationScanner->string($this->string());
     $interpolationScanner->pos($this->pos());
     $interpolationScanner->interpolation = true;
     $interpolationScanner->init();
     $interpolationScanner->main();
     $this->record($interpolationScanner->tagged(), 'INTERPOLATION', true);
     $this->pos($interpolationScanner->pos());
 }