summaryrefslogtreecommitdiff
path: root/test/samples/global_vars.rb
blob: 8066d67d2ca38f076f1c03e2f4254499aa00259f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
code = <<'CODE'
$ie.text_field(:name, "pAnfrage ohne $gV und mit #{$gv}").set artikel
oder
text = $bla.test(...) 
CODE

require 'coderay'

tokens = CodeRay.scan code, :ruby
tokens.each_text_token { |text, kind| text.upcase! }
tokens.each(:global_variable) { |text, kind| text.replace '<--%s-->' % text }

print tokens