[Nitro] Who knows aspects?

Jonas Pfenniger zimba.tm at gmail.com
Tue Jun 27 06:47:51 EDT 2006


Hi,

Glue::Aspects is not a real AOP Aspect. Instead, the class has to
define interceptable methods.

og/store/sql.rb defines pre and post methods for og_insert, og_update,
og_read and og_delete

you can use it like that :

class User
   before :check_something, :on => [:og_read, :og_insert]

private
  def check_something
    #...
  end
end

-- 
Cheers,
  zimbatm

http://zimbatm.oree.ch


More information about the Nitro-general mailing list