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.2.6 lib/rad/_support/filters.rb
rad_core-0.2.5 lib/rad/_support/filters.rb
rad_core-0.2.4 lib/rad/_support/filters.rb
rad_core-0.2.3 lib/rad/_support/filters.rb
rad_core-0.2.2 lib/rad/_support/filters.rb
rad_core-0.2.1 lib/rad/_support/filters.rb
rad_core-0.2.0 lib/rad/_support/filters.rb
rad_core-0.0.30 lib/rad/_support/filters.rb
rad_core-0.0.29 lib/rad/_support/filters.rb
rad_core-0.0.28 lib/rad/_support/filters.rb
rad_core-0.0.27 lib/rad/_support/filters.rb
rad_core-0.0.26 lib/rad/_support/filters.rb
rad_core-0.0.25 lib/rad/_support/filters.rb
rad_core-0.0.24 lib/rad/_support/filters.rb
rad_core-0.0.23 lib/rad/_support/filters.rb
rad_core-0.0.22 lib/rad/_support/filters.rb
rad_core-0.0.21 lib/rad/_support/filters.rb
rad_core-0.0.20 lib/rad/_support/filters.rb
rad_core-0.0.19 lib/rad/_support/filters.rb
rad_core-0.0.18 lib/rad/_support/filters.rb