from the line above the line you show, allow is either true or is a block or is nil. The line you show then checks that (1) allowed is not nil and either (2a) allowed is true or (2b) allowed is a block which returns true when passed resource (and resource must not be nil)
from the line above the line you show,
allow
is eithertrue
or is ablock
or isnil
. The line you show then checks that (1)allowed
is notnil
and either (2a)allowed
istrue
or (2b)allowed
is a block which returnstrue
when passedresource
(andresource
must not benil
)