rbjs 0.9.11 → 0.9.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rbjs.rb +7 -9
- data/lib/rbjs/version.rb +1 -1
- metadata +1 -1
data/lib/rbjs.rb
CHANGED
@@ -108,16 +108,14 @@ module Rbjs
|
|
108
108
|
elsif arg.is_a?(Hash)
|
109
109
|
'{'+arg.map{|key, val|to_argument(key)+': '+to_argument(val)}.join(',')+'}'
|
110
110
|
elsif arg.is_a?(Proc)
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
function_parameters << ArgumentProxy.new(root, param[1])
|
118
|
-
end
|
119
|
-
"function(#{function_parameter_names.join ', '}) {\n#{root.evaluate function_parameters}}"
|
111
|
+
root = Root.new(@_view_context, &arg)
|
112
|
+
function_parameters = []
|
113
|
+
function_parameter_names = []
|
114
|
+
for param in arg.parameters
|
115
|
+
function_parameter_names << param[1]
|
116
|
+
function_parameters << ArgumentProxy.new(root, param[1])
|
120
117
|
end
|
118
|
+
"function(#{function_parameter_names.join ', '}) {\n#{root.evaluate function_parameters}}"
|
121
119
|
else
|
122
120
|
arg.to_json
|
123
121
|
end
|
data/lib/rbjs/version.rb
CHANGED