lib/dmtd_vbmapp_data/assessment_report.rb
# Resolver is a block that takes a single argument, a string, which is the variable name.  The result
# should be the value to bind to that variable.
Resolver is a block that takes a single argument, a string, which is the variable name.  The result
should be the value to bind to that variable.
Resolver is a block that takes a single argument a string which is the variable name . The result should be the value to bind to that variable .
def sub_vars(sub_string)
      result = sub_string
      sub_string.scan(/%([a-zA-Z_][a-zA-Z0-9_]*)%/).flatten.each do |var|
        result = result.gsub("%#{var}%", resolver.call(var).to_s)
      end
      result
    end
def sub_vars ( sub_string ) result = sub_string sub_string . scan ( / %([a-zA-Z_][a-zA-Z0-9_]*)% / ) . flatten . each do | var | result = result . gsub ( "%#{var}%" , resolver . call ( var ) . to_s ) end result end
Resolver is a block that takes a single argument, a string, which is the variable name.
Resolver is a block that takes a single argument a string which is the variable name .
sub_string
<not_specific>