Class: Hash

Inherits:
Object show all
Defined in:
lib/opal/native.rb

Instance Method Summary collapse

Instance Method Details

#to_nativeObject



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/opal/native.rb', line 206

def to_native
	%x{
		var map    = this.map,
				result = {};

		for (var assoc in map) {
			var key   = map[assoc][0],
					value = map[assoc][1];

			result[key] = #{Native === `value` ? `value` : `value`.to_native};
		}

		return result;
	}
end