Module: Hooked::ClassMethods
- Defined in:
- lib/hooked.rb
Instance Attribute Summary collapse
-
#instance_hooked ⇒ Object
readonly
Returns the value of attribute instance_hooked.
Instance Method Summary collapse
Instance Attribute Details
#instance_hooked ⇒ Object (readonly)
Returns the value of attribute instance_hooked.
51 52 53 |
# File 'lib/hooked.rb', line 51 def instance_hooked @instance_hooked end |
Instance Method Details
#new_with_hooked(*args, &block) ⇒ Object
64 65 66 67 68 69 70 71 72 |
# File 'lib/hooked.rb', line 64 def new_with_hooked(*args, &block) obj = new_without_hooked *args, &block instance_hooked.each do |pointcut, aspects| aspects.each do |aspect| obj.send aspect[:type], pointcut, *aspect[:args], &aspect[:block] end end obj end |