This commit is contained in:
azure-pipelines[bot] 2023-03-28 07:39:06 +00:00
parent 67e01c76b4
commit 02bed41d9a
554 changed files with 652 additions and 377 deletions

2
1526.js Normal file
View file

@ -0,0 +1,2 @@
"use strict";(self.webpackChunkmy_application=self.webpackChunkmy_application||[]).push([[1526],{1526:(n,e,a)=>{a.r(e),a.d(e,{default:()=>t});const t="class Random < Liquid::Block\n def initialize(tag_name, markup, tokens)\n super\n @rand = markup.to_i\n end\n\n def render(context)\n value = rand(@rand)\n super.sub('^^^', value.to_s) # calling `super` returns the content of the block\n end\nend\n\nLiquid::Template.register_tag('random', Random)\ntext = \" {% random 5 %} you have drawn number ^^^, lucky you! {% endrandom %} \"\n@template = Liquid::Template.parse(text)\n@template.render # will return \"you have drawn number 1, lucky you!\" in 20% of cases\n"}}]);
//# sourceMappingURL=1526.js.map