More flexible Ruby helper