Class: Glimmer::SWT::LatestShellProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/glimmer/swt/latest_shell_proxy.rb

Overview

< ShellProxy

Instance Method Summary collapse

Constructor Details

#initialize(parent, args, block) ⇒ LatestShellProxy

Returns a new instance of LatestShellProxy.



25
26
27
# File 'lib/glimmer/swt/latest_shell_proxy.rb', line 25

def initialize(parent, args, block)
  # No Op
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/glimmer/swt/latest_shell_proxy.rb', line 29

def method_missing(method, *args, &block)
  if latest_shell.nil?
    super(method, *args, &block)
  else
    latest_shell.send(method, *args, &block)
  end
end

Instance Method Details

#latest_shellObject



47
48
49
# File 'lib/glimmer/swt/latest_shell_proxy.rb', line 47

def latest_shell
  @latest_shell ||= DisplayProxy.instance.shells.last
end

#openObject



41
42
43
44
45
# File 'lib/glimmer/swt/latest_shell_proxy.rb', line 41

def open
  Document.ready? do
    latest_shell&.open
  end
end

#respond_to?(method, *args, &block) ⇒ Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/glimmer/swt/latest_shell_proxy.rb', line 37

def respond_to?(method, *args, &block)
  super || latest_shell&.respond_to?(method, *args, &block)
end