This is digging up an old thread, but here's a snippet I think should work:
<span class="syntaxdefault"><br />module TransformationHelper<br /><br /> def flipped_x</span><span class="syntaxkeyword">?<br /> </span><span class="syntaxdefault">dot_x</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_y</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_z </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">axes_dot_products</span><span class="syntaxkeyword">()<br /> </span><span class="syntaxdefault">dot_x </span><span class="syntaxkeyword">< </span><span class="syntaxdefault">0 </span><span class="syntaxkeyword">&& </span><span class="syntaxdefault">flipped</span><span class="syntaxkeyword">?(</span><span class="syntaxdefault">dot_x</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_y</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_z</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">end<br /><br /> def flipped_y</span><span class="syntaxkeyword">?<br /> </span><span class="syntaxdefault">dot_x</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_y</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_z </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">axes_dot_products</span><span class="syntaxkeyword">()<br /> </span><span class="syntaxdefault">dot_y </span><span class="syntaxkeyword">< </span><span class="syntaxdefault">0 </span><span class="syntaxkeyword">&& </span><span class="syntaxdefault">flipped</span><span class="syntaxkeyword">?(</span><span class="syntaxdefault">dot_x</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_y</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_z</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">end<br /><br /> def flipped_z</span><span class="syntaxkeyword">?<br /> </span><span class="syntaxdefault">dot_x</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_y</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_z </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">axes_dot_products</span><span class="syntaxkeyword">()<br /> </span><span class="syntaxdefault">dot_z </span><span class="syntaxkeyword">< </span><span class="syntaxdefault">0 </span><span class="syntaxkeyword">&& </span><span class="syntaxdefault">flipped</span><span class="syntaxkeyword">?(</span><span class="syntaxdefault">dot_x</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_y</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_z</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">end<br /><br /> </span><span class="syntaxkeyword">private<br /><br /> </span><span class="syntaxdefault">def axes_dot_products<br /> </span><span class="syntaxkeyword">[<br /> </span><span class="syntaxdefault">xaxis</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">dot</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">X_AXIS</span><span class="syntaxkeyword">),<br /> </span><span class="syntaxdefault">yaxis</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">dot</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Y_AXIS</span><span class="syntaxkeyword">),<br /> </span><span class="syntaxdefault">zaxis</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">dot</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Z_AXIS</span><span class="syntaxkeyword">)<br /> ]<br /> </span><span class="syntaxdefault">end<br /><br /> def flipped</span><span class="syntaxkeyword">?(</span><span class="syntaxdefault">dot_x</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_y</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dot_z</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">dot_x </span><span class="syntaxkeyword">* </span><span class="syntaxdefault">dot_y </span><span class="syntaxkeyword">* </span><span class="syntaxdefault">dot_z </span><span class="syntaxkeyword">< </span><span class="syntaxdefault">0<br /> end<br /><br />end<br /><br /><br />module Example<br /><br /> def self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">inspect_flipped<br /> tr </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">selection</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">].</span><span class="syntaxdefault">transformation<br /> tr</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">extend</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">TransformationHelper</span><span class="syntaxkeyword">)<br /><br /> </span><span class="syntaxdefault">p tr</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">flipped_x</span><span class="syntaxkeyword">?<br /> </span><span class="syntaxdefault">p tr</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">flipped_y</span><span class="syntaxkeyword">?<br /> </span><span class="syntaxdefault">p tr</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">flipped_z</span><span class="syntaxkeyword">?<br /> </span><span class="syntaxdefault">end<br /><br />end<br /></span>