Module: Hooked::ClassMethods
- Defined in:
- lib/hooked.rb
Instance Attribute Summary (collapse)
-
- (Object) instance_hooked
readonly
Returns the value of attribute instance_hooked.
Instance Method Summary (collapse)
Instance Attribute Details
- (Object) instance_hooked (readonly)
Returns the value of attribute instance_hooked
56 57 58 |
# File 'lib/hooked.rb', line 56 def instance_hooked @instance_hooked end |
Instance Method Details
- (Object) new_with_hooked(*args, &block)
69 70 71 72 73 74 75 76 77 |
# File 'lib/hooked.rb', line 69 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 |