def env_for(rjr_method)
     # look for exact match first
     env = @environments.find { |k,v| k == rjr_method }

     # if not found try to match regex's
     env ||= @environments.find { |k,v| k.is_a?(Regexp) && (k =~ rjr_method) }

     env.nil? ? nil : env.last
  end
def env_for(rjr_method)
     # look for exact match first
     env = @environments.find { |k,v| k == rjr_method }

     # if not found try to match regex's
     env ||= @environments.find { |k,v| k.is_a?(Regexp) && (k =~ rjr_method) }

     env.nil? ? nil : env.last
  end
Return the environment registered for the specified method