Two thoughts:
1) If you're doing a simple hand calc, then there isn't a true right or wrong answer. I'd probably take the length from ridge to eave, but then use a K value greater than 1.0 to account for the fact that I'm in a sway frame and I don't have full support at the ends. What value to use for this K is pretty tricky though.
2) If I'm doing an FEM analysis of the frame (one which considered P-Delta effects) such as the Direct Analysis Method from AISC, then I would use the same unbraced length (eave to ridge). However, I would use a K = 1.0 and let my 2nd order analysis predict my member and frame buckling. Note: this may require introducing extra joints along the length of the member to capture the P-little delta effect.