マクロをRubyで書きたいんだけど、定数はどう表現すればよいでしょうか?

こんな感じのマクロをRubyで書く場合
var y = document.selection.GetActivePointY(mePosLogical);
window.Alert(y);

そのままだとエラーになってしまう。とりあえず直値で書いてる。
# y = Window.document.selection.GetActivePointY(mePosLogical)
y = Window.document.selection.GetActivePointY(2)
Window.Alert(y)