Top Level Namespace
Defined Under Namespace
Modules: Coopy, Haxe, Rb, Sys
Classes: HxOverrides, HxSys, IMap, Lambda, List, Reflect, StringBuf, Type, ValueType
Constant Summary
collapse
- Daff =
Coopy
Instance Method Summary
collapse
Instance Method Details
#_hx_add(x, y) ⇒ Object
77
|
# File 'lib/daff.rb', line 77
def _hx_add(x,y) (((x.is_a? String)||(y.is_a? String)) ? (_hx_str(x)+_hx_str(y)) : (x+y)) end
|
#_hx_ord(s) ⇒ Object
78
|
# File 'lib/daff.rb', line 78
def _hx_ord(s) return 0 if s.nil?; s.ord end
|
#_hx_str(x) ⇒ Object
76
|
# File 'lib/daff.rb', line 76
def _hx_str(x) (x.nil? ? 'null' : x.to_s) end
|
#_hx_ushr(x, ct) ⇒ Object
75
|
# File 'lib/daff.rb', line 75
def _hx_ushr(x,ct) (((x<0) ? (x + 0x100000000) : x) >> ct) end
|
#hx_exception(x) ⇒ Object
89
90
91
|
# File 'lib/daff.rb', line 89
def hx_exception(x)
hx_exception_class(x.class).new(x)
end
|
#hx_exception_class(c) ⇒ Object
80
81
82
83
84
85
86
87
88
|
# File 'lib/daff.rb', line 80
def hx_exception_class(c)
$hx_exception_classes[c.name] ||= Class.new(RuntimeError) do
Object.const_set((c.name.split(/::/).old_access(-1)||'') + 'HaxeException',self)
def initialize(target) @target = target; end
def method_missing(name, *args, &block)
@target.send(name, *args, &block)
end
end
end
|