1# Copyright (c) 2006-2008, The RubyCocoa Project. 2# Copyright (c) 2001-2006, FUJIMOTO Hisakuni. 3# All Rights Reserved. 4# 5# RubyCocoa is free software, covered under either the Ruby's license or the 6# LGPL. See the COPYRIGHT file for more information. 7 8module OSX 9 10 # NSImage additions 11 class NSImage 12 def focus 13 lockFocus 14 begin 15 yield 16 ensure 17 unlockFocus 18 end 19 end 20 end 21end 22