def button(name, locator)
      define_method(name) do
        platform.press_button(locator)
      end
      define_method("#{name}_view") do
        Gametel::Views::Button.new(platform, locator)
      end
    end
def button(name, locator)
      define_method(name) do
        platform.press_button(locator)
      end
      define_method("#{name}_view") do
        Gametel::Views::Button.new(platform, locator)
      end
    end
Generates a method to click a button and determine if it is enabled.

 @example
   button(:save, :text => 'Save')
   # will generate 'save' and 'save_enabled?' methods

 @param  [Symbol]  the name used for the generated methods
 @param  [Hash]  locator for how the button is found  The valid
 keys are:
  * :text
  * :index
  * :id