module Lab42::AOP::Meta
Public Instance Methods
add_attribute(objct, att_name)
click to toggle source
# File lib/lab42/aop/meta.rb, line 11 def add_attribute objct, att_name class << objct; self end.module_eval do attr_accessor att_name end objct end
add_singleton_method(objct, name, &method)
click to toggle source
# File lib/lab42/aop/meta.rb, line 4 def add_singleton_method objct, name, &method class << objct; self end.module_eval do define_method name, &method end objct end