How to check in MySelectionObserver if some WebDialog is shown?

as the topic.
I run webdialog which attach observer:
> @@myselectionobserver =

			Sketchup.active_model.selection.add_observer(@@myselectionobserver) # Attach the observer.

In this observer I do same things. And I have to attach another MySelectionObserver wich will make different things

  1. I can make those two thing in one MySelectionObserver (how to check what caused observer?), or
  2. I can attach two MySelectionObserver

What way is better? Both observers are colled with webdialogs.

See new code example: