Module: Amber::Render::Filter::Variables
- Defined in:
- lib/amber/render/filter/variables.rb
Constant Summary collapse
- VARIABLES_RE =
variable expansion uses }
/ \{\{ # start {{ ([^\{\}]+) # $text : one or more characters that are not { or } ($1) \}\} # end }} /x
Class Method Summary collapse
Class Method Details
.run(text, &block) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/amber/render/filter/variables.rb', line 19 def self.run(text, &block) text.gsub(VARIABLES_RE) do |m| variable_name = $~[1].strip yield(variable_name) end end |