If any person to whom a writ of habeas corpus shall be directed shall refuse to receive the writ or shall neglect to obey and execute it according to the provisions of this chapter and no sufficient excuse shall be shown for his or her refusal or neglect, the court before which the writ is returnable shall proceed immediately, by process of attachment as for a contempt, to compel obedience to the writ and to punish the person guilty of the contempt.
R.I. Gen. Laws § 10-9-23