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-8.1.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-8.0.1 lib/rack/app/singleton_methods/hooks.rb
rack-app-8.0.0 lib/rack/app/singleton_methods/hooks.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-app-7.7.0/lib/rack/app/singleton_methods/hooks.rb
rack-app-7.7.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.6.5 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.6.4 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.6.3 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.6.2 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.6.1 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.6.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.5.2 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.5.1 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.5.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.4.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.3.2 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.3.1 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.3.0 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.2.2 lib/rack/app/singleton_methods/hooks.rb
rack-app-7.2.1 lib/rack/app/singleton_methods/hooks.rb