Class: Class

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

Instance Method Summary collapse

Instance Method Details

#apply(aspect) ⇒ Object



163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/cuts/aop.rb', line 163

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



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

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