Class: RShell

Inherits:
RWidget show all
Defined in:
lib/command_handlers/models/r_shell.rb

Instance Attribute Summary collapse

Attributes inherited from RWidget

#widget

Instance Method Summary collapse

Methods inherited from RWidget

#add_listener, #async_exec, #can_add_listener?, #has_attribute?, #has_style?, #process_block, #set_attribute, #sync_exec, widget_exists?, #widget_listener_exists?

Methods included from Parent

#process_block

Constructor Details

#initialize(display = Display.new) ⇒ RShell



9
10
11
12
13
# File 'lib/command_handlers/models/r_shell.rb', line 9

def initialize(display = Display.new)
  @display = display
  @widget = Shell.new(@display)
  @widget.setLayout(FillLayout.new)
end

Instance Attribute Details

#displayObject (readonly)

Returns the value of attribute display.



7
8
9
# File 'lib/command_handlers/models/r_shell.rb', line 7

def display
  @display
end

Instance Method Details

#openObject



15
16
17
18
19
20
21
22
# File 'lib/command_handlers/models/r_shell.rb', line 15

def open
  @widget.pack
  @widget.open
  until @widget.isDisposed
    @display.sleep unless @display.readAndDispatch
  end
  @display.dispose
end