Module: ATU
- Defined in:
- lib/atu/sikuli.rb,
lib/atu/key.rb,
lib/ruby_proxy/client.rb
Overview
~ include Java
Defined Under Namespace
Constant Summary collapse
- KEY_SHIFT =
This equals to java.awt.event.InputEvent.SHIFT_MASK.
InputEvent::SHIFT_MASK
- KEY_CTRL =
This equals to java.awt.event.InputEvent.CTRL_MASK.
InputEvent::CTRL_MASK
- KEY_META =
This equals to java.awt.event.InputEvent.META_MASK.
InputEvent::META_MASK
- KEY_CMD =
This equals to java.awt.event.InputEvent.META_MASK.
InputEvent::META_MASK
- KEY_WIN =
This equals to java.awt.event.InputEvent.META_MASK.
InputEvent::META_MASK
- KEY_ALT =
This equals to java.awt.event.InputEvent.ALT_MASK.
InputEvent::ALT_MASK
Class Method Summary collapse
Class Method Details
.const_missing(name) ⇒ Object
entry
9 10 11 12 13 |
# File 'lib/ruby_proxy/client.rb', line 9 def self.const_missing(name) name = self.name.to_s + "::" + name.to_s type = RubyProxy::DRbClient.client.proxy_type(name.to_s) make_kclass(name,type) end |
.make_kclass(name, type) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/ruby_proxy/client.rb', line 15 def self.make_kclass(name,type) #puts "make_kclass: #{name}, #{type}" case type when "Class" RubyProxy::KlassFactory.make_class(name) do |klass| klass.class_eval do def initialize(*arg) #puts self.class.to_s @proxy = RubyProxy::DRbClient.client.proxy(self.class.to_s,"new",*arg) # undef type method # I think all methods should be proxyed by remote #~ class << @proxy #~ undef :type #~ end end undef :type rescue nil undef :to_s undef :to_a if respond_to?(:to_a) undef :methods def __proxy @proxy end def method_missing(name,*arg) #return if @proxy.nil? #puts "#{@proxy.methods(false)}" #puts "proxy = #{@proxy} method=#{name} arg=#{arg.join(',')}" @proxy.__send__(name.to_s,*arg) end def self.const_missing(name) name = self.name.to_s + "::" + name.to_s type = RubyProxy::DRbClient.client.proxy_type(name.to_s) ret = ATU::make_kclass(name,type) case type when "Module","Class" return ret end RubyProxy::DRbClient.client.proxy(name.to_s) end # block not support now def self.method_missing(name,*arg) RubyProxy::DRbClient.client.proxy(self.name.to_s,name.to_s,*arg) end end end when "Module" RubyProxy::KlassFactory.make_module(name) do |mod| mod.class_eval do def self.method_missing(name,*arg) RubyProxy::DRbClient.client.proxy(self.name.to_s,name.to_s,*arg) end def self.const_missing(name) name = self.name.to_s + "::" + name.to_s #puts "in module const_missing : #{name}" type = RubyProxy::DRbClient.client.proxy_type(name.to_s) ret = ATU::make_kclass(name,type) case type when "Module","Class" return ret end RubyProxy::DRbClient.client.proxy(name.to_s) end end end else end end |