Sha256: c7f7c070d167bfbb4ed1b1856c6805a494366914ac8f34b3675c5002a2f8f04d

Contents?: true

Size: 275 Bytes

Versions: 56

Compression:

Stored size: 275 Bytes

Contents

module Rack::App::SingletonMethods::Hooks

  def before(&block)
    @before_hooks ||= []
    @before_hooks << block unless block.nil?
    @before_hooks
  end

  def after(&block)
    @after_hooks ||= []
    @after_hooks << block unless block.nil?
    @after_hooks
  end

end

Version data entries

56 entries across 56 versions & 2 rubygems

Version Path
rack-app-5.10.2 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.10.1 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.10.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.9.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.8.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.7.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.7.0.rc lib/rack/app/singleton_methods/hooks.rb
rack-app-5.6.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.5.1 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.4.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.3.2 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.3.1 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.3.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.2.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.1.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-5.0.0 lib/rack/app/singleton_methods/hooks.rb