class Thor::Actions::EmptyDirectory

def convert_encoded_instructions(filename)


user.rb

It gets the class name from the base and replace it:

%class_name%.rb

Filenames in the encoded form are converted. If you have a file:
def convert_encoded_instructions(filename)
  filename.gsub(/%(.*?)%/) do |string|
    instruction = $1.strip
    base.respond_to?(instruction) ? base.send(instruction) : string
  end
end