class Vernacular::Modifiers::NumberSigil
Extends Ruby syntax to allow number sigils, or ~n(…). The expression inside is parsed and evaluated, and is replaced by the result.
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/vernacular/modifiers/number_sigil.rb, line 8 def initialize super(%r{~n\(([\d\s+-/*\(\)]+?)\)}) do |match| eval(match[3..-2]) # rubocop:disable Security/Eval end end