Module: Roda::RodaPlugins::EarlyHints::InstanceMethods
- Defined in:
- lib/roda/plugins/early_hints.rb
Instance Method Summary collapse
-
#send_early_hints(hash) ⇒ Object
Send given hash of Early Hints using the rack.early_hints environment variable, currenly only supported by puma.
Instance Method Details
#send_early_hints(hash) ⇒ Object
Send given hash of Early Hints using the rack.early_hints environment variable, currenly only supported by puma. hash given should generally have the single key ‘Link’, and a string or array of strings for each of the early hints.
15 16 17 18 19 |
# File 'lib/roda/plugins/early_hints.rb', line 15 def send_early_hints(hash) if eh_proc = env['rack.early_hints'] eh_proc.call(hash) end end |