<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,7 +4,7 @@ module Nobbie
 
       class ComponentAwareCommand  #:nodoc:
         def initialize(path)
-          @path = path
+          @path = coerce_path(path)
         end
 
         def component
@@ -50,8 +50,23 @@ module Nobbie
             end
           end
         end
-      end
 
+        private
+
+        def coerce_path(path)
+          return path if path.respond_to?(:find_component)
+
+          if path.is_a?(Hash) &amp;&amp; path.has_key?(:in)
+            return path[:in].is_a?(String) ? in_(path[:in]) : path[:in]
+          end
+
+          return in_(path.id2name) if path.is_a?(Symbol)
+          return in_(path) if path.is_a?(String)
+
+          Kernel.raise(&quot;Unable to coerce path: #{path}&quot;)
+        end
+
+      end
     end
   end
 end</diff>
      <filename>lib/nobbie/wx/command.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ module Nobbie
       # Types text into the component specified in the path.
       #  Supported components: TextCtrl, ComboBox
       def type(text, path)
-        execute(command_factory.create_type_into_command(coerce_path(path), text))
+        execute(command_factory.create_type_into_command(path, text))
       end
 
       # Returns the text in the component specified in the path.
@@ -23,50 +23,50 @@ module Nobbie
       # Clicks the component specified in the path.
       #  Supported components: Button
       def click(path)
-        execute(command_factory.create_click_on_command(coerce_path(path)))
+        execute(command_factory.create_click_on_command(path))
       end
 
       # Returns the component specified in the path.  Useful for performing operations that Nobbie does not
       # currently support.
       #  Supported components: Any
       def component(path)
-        execute(command_factory.create_get_component_command(coerce_path(path)))
+        execute(command_factory.create_get_component_command(path))
       end
 
       # Selects the given value for the component specified in the path.
       #  Supported components: Notebook, Menu, ComboBox, ListBox, Choice
       def select(value, path)
-        execute(command_factory.create_select_command(coerce_path(path), value))
+        execute(command_factory.create_select_command(path, value))
       end
 
       # Retrieves the currently selected value for the component specified in the path.
       #  Supported components: Notebook, ComboBox, ListBox, Choice
       def selected_value(path)
-        execute(command_factory.create_get_selected_values_command(coerce_path(path)))
+        execute(command_factory.create_get_selected_values_command(path))
       end
 
       # Retrieves available options for the component specified in the path.
       #  Supported components: Notebook, ComboBox, ListBox, Choice
       def options(path)
-        execute(command_factory.create_get_options_command(coerce_path(path)))
+        execute(command_factory.create_get_options_command(path))
       end
 
       # Chooses the component specified in the path.
       #  Supported components: RadioButton, CheckBox
       def choose(path)
-        execute(command_factory.create_choose_command(coerce_path(path)))
+        execute(command_factory.create_choose_command(path))
       end
 
       # Determines if the component specified in the path is chosen.
       #  Supported components: RadioButton, CheckBox
       def chosen?(path)
-        execute(command_factory.create_is_chosen_command(coerce_path(path)))
+        execute(command_factory.create_is_chosen_command(path))
       end
 
       # Determines if the component specified in the path is currently enabled.
       #  Supported components: Any
       def enabled?(path)
-        execute(command_factory.create_is_enabled_command(coerce_path(path)))
+        execute(command_factory.create_is_enabled_command(path))
       end
 
       # Creates an instance of the default {path builder}[link:classes/Nobbie/Wx/ElementPathBuilder.html].
@@ -86,20 +86,6 @@ module Nobbie
         Command::Executor.execute(command)
       end
 
-      private
-
-      def coerce_path(path)
-        return path if path.respond_to?(:find_component)
-
-        if path.is_a?(Hash) &amp;&amp; path.has_key?(:in)
-          return path[:in].is_a?(String) ? in_(path[:in]) : path[:in]
-        end
-
-        return in_(path.id2name) if path.is_a?(Symbol)
-        return in_(path) if path.is_a?(String)
-
-        Kernel.raise(&quot;Unable to coerce path: #{path}&quot;)
-      end
     end
 
   end</diff>
      <filename>lib/nobbie/wx/operations.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>25915dab54b0fceb7dc0c7ab789e63a2341c2891</id>
    </parent>
  </parents>
  <author>
    <name>Bryan Ash</name>
    <email>bryan.a.ash@gmail.com</email>
  </author>
  <url>http://github.com/bryan-ash/wx-nobbie/commit/29039e1ff4ae4731d414cbea510fd82337ad80cd</url>
  <id>29039e1ff4ae4731d414cbea510fd82337ad80cd</id>
  <committed-date>2009-03-21T08:09:42-07:00</committed-date>
  <authored-date>2009-03-21T08:09:42-07:00</authored-date>
  <message>Moved coerce_path into ComponentAwareCommand to remove duplication in Operations</message>
  <tree>27b69d4b4c8733a5936cfb3defc578c4e056cd12</tree>
  <committer>
    <name>Bryan Ash</name>
    <email>bryan.a.ash@gmail.com</email>
  </committer>
</commit>
