Module: Kernel

Defined in:
lib/opal/native.rb,
lib/opal/native/bridge.rb

Instance Method Summary collapse

Instance Method Details

#define_singleton_method_bridge(target, name, ali = nil) ⇒ Object



118
119
120
121
122
# File 'lib/opal/native/bridge.rb', line 118

def define_singleton_method_bridge (target, name, ali = nil)
	define_singleton_method ali || name do |*args, &block|
		Native.send(target, name, *args, &block)
	end
end

#Native(object) ⇒ Object



180
181
182
183
184
# File 'lib/opal/native.rb', line 180

def Native (object)
	return if `object == null`

	Native === object ? Native::Object.new(object) : object
end