Method: Innate::Helper::Aspect::SingletonMethods#after

Defined in:
lib/innate/helper/aspect.rb

#after(*names, &block) ⇒ Object

Hook that is called after a specific list of actions.

Examples:

class MainController
  include Innate::Node

  map '/'

  helper :aspect

  after(:index, :other) do
    puts 'Executed after specific actions only.'
  end

  def index
    return 'Hello, Innate!'
  end

  def other
    return 'Other method'
  end
end


248
249
250
# File 'lib/innate/helper/aspect.rb', line 248

def after(*names, &block)
  names.each{|name| AOP[self][:after][name] = block }
end