Whip me in public, says Malaysian ex-model

So its okay as long as she drinks beer in private ? If Islam is being used as the basis for justifying this law, it seems rather odd that drinking in private is not outlawed.