Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 42 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. <def tag="js-wrapper" attrs="convert">
  2.   <set-scoped vals="&[]">
  3.     <do param="default" />
  4.     <% if convert %>
  5.       <%= "[#{scope.vals.*.inspect.join(', ')}]" %>
  6.     <% else %>
  7.       <% scope.retval = scope.vals %>
  8.     <% end %>
  9.   </set-scoped>
  10. </def>
  11.  
  12. <def tag="hash-param" attrs="key">
  13.   <set-scoped retval="">
  14.     <% value = parameters.default %>
  15.     <% value = scope.retval if value.blank? %>
  16.     <% scope.vals << Hash[key, value] %>
  17.   </set-scoped>
  18. </def>
  19.  
  20. <def tag="array-param">
  21.   <set-scoped retval="">
  22.     <% value = parameters.default %>
  23.     <% value = scope.retval if value.blank? %>
  24.     <% scope.vals << value %>
  25.   </set-scoped>
  26. </def>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top