       type: 'string'
       default: ''
 
-  setUpConfigManagement: ->
-    configKeyPath = "#{@pkgName}.rubyInterpreterDirectoryPath"
-
-    if rubyInterpreterDirectoryPath = atom.config.get(configKeyPath).trim()
+  setExecutionCommandPatterns: (directory) ->
+    if rubyInterpreterDirectoryPath = directory.trim()
       rubyInterpreterPath = path.join rubyInterpreterDirectoryPath, 'ruby'
       @language.setExecutionCommandPatterns ["#{rubyInterpreterPath} <filePath>"]
     else
       @language.setExecutionCommandPatterns ['ruby <filePath>']
+    return
 
+  setUpConfigManagement: ->
+    configKeyPath = "#{@pkgName}.rubyInterpreterDirectoryPath"
+    @setExecutionCommandPatterns atom.config.get configKeyPath
     @configSubscription = atom.config.onDidChange configKeyPath, ({newValue}) =>
-      if rubyInterpreterDirectoryPath = newValue.trim()
-        rubyInterpreterPath = path.join rubyInterpreterDirectoryPath, 'ruby'
-        @language.setExecutionCommandPatterns ["#{rubyInterpreterPath} <filePath>"]
-      else
-        @language.setExecutionCommandPatterns ['ruby <filePath>']+      @setExecutionCommandPatterns newValue
+    return
      @languageRegistry.removeLanguage @language
      @usingLevels = false
      @onDidStopUsingLevels()

  onDidStartUsingLevels: ->
    @setUpConfigManagement()
    process.env['LRB_WHITELIST_PATH'] = path.join @pkgLanguageDirPath, 'whitelist'

  onDidStopUsingLevels: ->
    @configSubscription.dispose()
    delete process.env['LRB_WHITELIST_PATH']

  config:
    rubyInterpreterDirectoryPath:

    @pkgLanguageDirPath = path.join pkgDirPath, 'language'

    @configFilePath = CSON.resolve path.join @pkgLanguageDirPath, 'config'
    executable = if process.platform == 'win32' then 'run.exe' else 'run'
    @executablePath = path.join @pkgLanguageDirPath, 'executables', process.platform, executable

    dummyGrammarPath = CSON.resolve path.join @pkgLanguageDirPath, 'grammars', 'dummy'
    @dummyGrammar = atom.grammars.readGrammarSync dummyGrammarPath
