Sha256: ce27e3cdf51e35d0783cd91b00e7d8dc2a78c9750d5772749ee3efcc13dd1dc1

Contents?: true

Size: 843 Bytes

Versions: 24

Compression:

Stored size: 843 Bytes

Contents

module Rad::Filters
  inherit Rad::Callbacks    
        
  module ClassMethods
    def before *args, &block
      opt = args.extract_options!
      if block       
        set_callback :action, :before, opt, &block
      else 
        args.each{|executor| set_callback :action, :before, executor, opt}        
      end
    end
    
    def around *args, &block
      opt = args.extract_options!
      if block       
        set_callback :action, :around, opt, &block
      else 
        args.each{|executor| set_callback :action, :around, executor, opt}        
      end
    end
    
    def after *args, &block
      opt = args.extract_options!
      if block       
        set_callback :action, :after, opt, &block
      else 
        args.each{|executor| set_callback :action, :after, executor, opt}        
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rad_core-0.0.17 lib/rad/_support/filters.rb
rad_core-0.0.16 lib/rad/_support/filters.rb
rad_core-0.0.15 lib/rad/_support/filters.rb
rad_core-0.0.14 lib/rad/_support/filters.rb