module Thor::Util

def self.constants_in_contents(str)

def self.constants_in_contents(str)
  klasses = ObjectSpace.classes.dup
  Module.new.class_eval(str)
  klasses = ObjectSpace.classes - klasses
  klasses = klasses.select {|k| k < Thor }
  klasses.map! {|k| k.to_s.gsub(/#<Module:\w+>::/, '')}
end