In vanilla processing mousePressed is both a variable and a method, for jruby_art the boolean variable is available as mouse_pressed?, whereas you can create events/operations that occur on mouse pressed by adding a mouse_pressed method as below:-

def mouse_pressed  
  # code gets executed on mouse pressed

For sketch with mouse_pressed method see drawolver, follow link for a sketch using mouse_pressed?.

See also:-

mouse_released, mouse_dragged, mouse_clicked