class Markdownplus::GetHandler

Public Instance Methods

execute(input, parameters, variables, warnings, errors) click to toggle source
# File lib/markdownplus/handler.rb, line 103
def execute(input, parameters, variables, warnings, errors)
  output = input
  if parameters==nil
    errors << "No variable name given"
  elsif parameters.count == 0
    errors << "No variable name given"
  else
    warnings << "More than one variable name given [#{parameters.inspect}]" if parameters.count > 1
    output = variables[parameters.first.to_s]
  end
  output
end