lib/haml_lint/utils.rb
# Yields interpolated values within a block of filter text.
Yields interpolated values within a block of filter text.
Yields interpolated values within a block of filter text .
def extract_interpolated_values(filter_text)
      Haml::Util.handle_interpolation(filter_text.dump) do |scan|
        escape_count = (scan[2].size - 1) / 2
        return unless escape_count.even?
        dumped_interpolated_str = Haml::Util.balance(scan, '{', '}', 1)[0][0...-1]
        yield eval('"' + dumped_interpolated_str + '"') 
      end
    end
def extract_interpolated_values ( filter_text ) Haml :: Util . handle_interpolation ( filter_text . dump ) do | scan | escape_count = ( scan [ 2 ] . size - 1 ) / 2 return unless escape_count . even? dumped_interpolated_str = Haml :: Util . balance ( scan , '{' , '}' , 1 ) [ 0 ] [ 0 ... - 1 ] yield eval ( '"' + dumped_interpolated_str + '"' ) end end
Yields interpolated values within a block of filter text.
Yields interpolated values within a block of filter text .
# Hacky way to turn a dumped string back into a regular string # rubocop:disable Eval
filter_text