Class: Nobbie::Wx::ChoosableOperations

Inherits:
Object
  • Object
show all
Defined in:
lib/nobbie/wx/impl/operation/choosable.rb

Instance Method Summary collapse

Constructor Details

#initialize(operations, path) ⇒ ChoosableOperations

Returns a new instance of ChoosableOperations.



5
6
7
8
# File 'lib/nobbie/wx/impl/operation/choosable.rb', line 5

def initialize(operations, path)
  @operations = operations
  @path = path    
end

Instance Method Details

#chooseObject

Chooses the component specified in the path.

Supported components: RadioButton, CheckBox


12
13
14
# File 'lib/nobbie/wx/impl/operation/choosable.rb', line 12

def choose
  execute(@operations.command_factory.create_choose_command(@path))
end

#chosen?Boolean

Determines if the component specified in the path is chosen.

Supported components: RadioButton, CheckBox

Returns:

  • (Boolean)


18
19
20
# File 'lib/nobbie/wx/impl/operation/choosable.rb', line 18

def chosen?
  execute(@operations.command_factory.create_is_chosen_command(@path))
end