module Less::JavaScript
Public Class Methods
to_js_hash(hash)
click to toggle source
# File lib/nashorn/rhino/less.rb, line 79 def self.to_js_hash(hash) # TODO this needs to be figured out # we can not pass wrapped Ruby Hash objects down as they won't # have a prototype (and thus no hasOwnProperty) js_hash = Nashorn.eval_js '({})' hash.each { |key, val| js_hash[key] = val } js_hash end