I typically design it as though it were a horizontal beam, except that for steep pitch roofs I account for extra dead load since there's more material per foot (in plan view). Snow loads should be applied along a horizontal projection anyway so this approach works well with that. Good point above concerning wind loads, which you would need to adjust accordingly, otherwise this method would be non-conservative for wind.
In Design of Wood Structures (Breyer) there's a few pages that get into the horizontal beam versus sloped beam design approaches. I find the horizontal beam approach simpler and generally adequate for what I typically do. There is potentially a compression force acting on a sloped rafter which wouldn't be accounted for in designing it as flat. With a ridge beam, it's probably reasonable to neglect this though. For a tied roof, you would technically want to check combined bending and axial stress, although in practice, most engineers probably don't. In most cases the axial capacity likely surpasses the demand by a significant margin.