why does dispatch! call invoke?

9 views
Skip to first unread message

b...@rodenhaeuser.de

unread,
Feb 16, 2018, 8:19:58 AM2/16/18
to sinatrarb
Hi, 

newbie here, with a question: I am studying the Sinatra code, and there is a piece I don't quite understand. 

The Base#call! method calls invoke, passing { dispatch! }. But then, dispatch! calls invoke again. 

Why is that second call to invoke needed? Couldn't we just call call static!, filter! and route! (i.e., what's in the block for that second invoke) directly? 

Many thanks in advance!
Ben 


Reply all
Reply to author
Forward
0 new messages