Enforce component attachment

My search skills must be failing me, or maybe I am asking the wrong question. I have a way in c# to programmatic enforce attached components. For example if I attach a specific script the script will cause an error if a rigid-body is not contented. But I can not seem to remember the syntax.

I think this is what you want. Note the lack of ; .


   @script RequireComponent(Rigidbody)


[RequireComponent (typeof (Rigidbody))]
class PlayerScript : MonoBehaviour {
    void FixedUpdate() {

Examples from Unity Script Reference.