@@ -3131,6 +3131,56 @@ Opal.modules["hyperloop/client_stubs"] = function(Opal) {
3131
3131
})($scope.base)
3132
3132
};
3133
3133
3134
+ /* Generated by Opal 0.10.3 */
3135
+ Opal.modules["hyperloop/context"] = function(Opal) {
3136
+ var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2;
3137
+
3138
+ Opal.add_stubs(['$[]', '$[]=', '$instance_variable_get', '$instance_variable_set', '$each', '$call', '$run']);
3139
+ return (function($base) {
3140
+ var $Hyperloop, self = $Hyperloop = $module($base, 'Hyperloop');
3141
+
3142
+ var def = self.$$proto, $scope = self.$$scope;
3143
+
3144
+ (function($base) {
3145
+ var $Context, self = $Context = $module($base, 'Context');
3146
+
3147
+ var def = self.$$proto, $scope = self.$$scope, TMP_1, TMP_3;
3148
+
3149
+ Opal.defs(self, '$set_var', TMP_1 = function $$set_var(ctx, var$) {
3150
+ var $a, $b, $c, self = this, $iter = TMP_1.$$p, block = $iter || nil;
3151
+ if (self.context_hash == null) self.context_hash = nil;
3152
+
3153
+ TMP_1.$$p = null;
3154
+ if ((($a = self.context_hash) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
3155
+ ($a = ctx, $b = self.context_hash, ((($c = $b['$[]']($a)) !== false && $c !== nil && $c != null) ? $c : $b['$[]=']($a, [var$, block])))};
3156
+ return ((($a = ctx.$instance_variable_get(var$)) !== false && $a !== nil && $a != null) ? $a : ctx.$instance_variable_set(var$, Opal.yieldX(block, [])));
3157
+ }, TMP_1.$$arity = 2);
3158
+
3159
+ Opal.defs(self, '$reset!', TMP_3 = function(reboot) {
3160
+ var $a, $b, TMP_2, self = this;
3161
+ if (self.context_hash == null) self.context_hash = nil;
3162
+
3163
+ if (reboot == null) {
3164
+ reboot = true;
3165
+ }
3166
+ if ((($a = self.context_hash) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
3167
+ ($a = ($b = self.context_hash).$each, $a.$$p = (TMP_2 = function(context, var_and_block){var self = TMP_2.$$s || this, $c, $d, var$ = nil, block = nil;
3168
+ if (context == null) context = nil;if (var_and_block == null) var_and_block = nil;
3169
+ $d = var_and_block, $c = Opal.to_ary($d), var$ = ($c[0] == null ? nil : $c[0]), block = ($c[1] == null ? nil : $c[1]), $d;
3170
+ return context.$instance_variable_set(var$, block.$call());}, TMP_2.$$s = self, TMP_2.$$arity = 2, TMP_2), $a).call($b);
3171
+ if (reboot !== false && reboot !== nil && reboot != null) {
3172
+ return (((($scope.get('Hyperloop')).$$scope.get('Application'))).$$scope.get('Boot')).$run()
3173
+ } else {
3174
+ return nil
3175
+ };
3176
+ } else {
3177
+ return self.context_hash = $hash2([], {})
3178
+ };
3179
+ }, TMP_3.$$arity = -1);
3180
+ })($scope.base)
3181
+ })($scope.base)
3182
+ };
3183
+
3134
3184
/* Generated by Opal 0.10.3 */
3135
3185
Opal.modules["hyperloop/on_client"] = function(Opal) {
3136
3186
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module;
@@ -3157,6 +3207,7 @@ Opal.modules["hyperloop-config"] = function(Opal) {
3157
3207
Opal.add_stubs(['$==', '$require']);
3158
3208
if ($scope.get('RUBY_ENGINE')['$==']("opal")) {
3159
3209
self.$require("hyperloop/client_stubs");
3210
+ self.$require("hyperloop/context");
3160
3211
return self.$require("hyperloop/on_client");}
3161
3212
};
3162
3213
0 commit comments