Class: Puma::Binder

Inherits:
Object
  • Object
show all
Defined in:
lib/puma/acme/binder.rb

Overview

Extend the ::Puma::Binder class to add hooks for acme binding support.

Instance Method Summary collapse

Instance Method Details

#before_parse_hook(&hook) ⇒ Object



15
16
17
# File 'lib/puma/acme/binder.rb', line 15

def before_parse_hook(&hook)
  (@before_parse_hooks ||= []) << hook
end

#parse_with_before_hooks(*a, &b) ⇒ Object Also known as: parse



6
7
8
9
10
# File 'lib/puma/acme/binder.rb', line 6

def parse_with_before_hooks(*a, &b)
  @before_parse_hooks&.each(&:call)

  original_parse(*a, &b)
end