def respond_to?(method, include_private = false)
super || @subject.respond_to?(method, include_private)
end
||
is an or
operator, so what does ||
between methods mean?
Will it always call super
unless super
returns nil then evaluate @subject.respond_to
because of short-circuiting for the ||
operator?
Edit: I think my question is not a duplicate because I know how the '||' operator work from other programming languages. I know what short-circuiting is. I just have never seen it used with just two methods without if statements involve.