Class: Class

Inherits:
Object show all
Defined in:
lib/cuts/aop.rb,
lib/cuts/cut.rb

Instance Method Summary collapse

Instance Method Details

#apply(aspect) ⇒ Object



159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/cuts/aop.rb', line 159

def apply(aspect)
  if aspects.empty?
    cross_cut(self)
    #(class << self;self;end).class_eval do
    #  alias_method :__new, :new
    #  def new(*args, &block)
    #    CrossConcerns.new(self,*args, &block)
    #  end
    #end
  end
  aspects.unshift(aspect)
end

#aspectsObject

def cut; @cut; end



157
# File 'lib/cuts/aop.rb', line 157

def aspects; @aspects ||= []; end

#cutsObject



88
89
90
# File 'lib/cuts/cut.rb', line 88

def cuts
  @cuts ||= []
end