Class: Nobbie::Wx::Command::ClickOnCommand

Inherits:
ComponentAwareCommand show all
Defined in:
lib/nobbie/wx/command/click_on.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from ComponentAwareCommand

#component, #ensure_enabled, #handle_unsupported_operation_for_component, #handle_value_not_found, #highlight, #initialize

Constructor Details

This class inherits a constructor from Nobbie::Wx::Command::ComponentAwareCommand

Instance Method Details

#describeObject



18
19
20
# File 'lib/nobbie/wx/command/click_on.rb', line 18

def describe
  "Click on #{@path}"
end

#executeObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/nobbie/wx/command/click_on.rb', line 6

def execute
  highlight {
    ensure_enabled

    if component.is_a?(Button)
      handle_button
    else
      handle_unsupported_operation_for_component
    end
  }
end