CompanyX

Inline Ruby Example

     $ruby.eval('"Hello, world.".upcase()')

$ruby.eval('"Hello, world.".upcase()')

Calling a Ruby Function

     $ruby.evalExpression('/demos/scripting/ruby/rubytest.rb','hello("dotCMS")')

The contents of the rubytest.rb are


     def hello(name)
	     "Hello, " + name.upcase()
     end


$ruby.evalExpression('/demos/scripting/ruby/rubytest.rb','hello("dotCMS")')
© 2017 dotCMS Inc. All rights reserved.