ParserFile: rename private method

This commit is contained in:
Olle Jonsson 2016-03-19 16:09:34 +01:00
parent 6b64d4e4a2
commit 1a289c872d

View File

@ -19,7 +19,7 @@ module GitHubChangelogGenerator
class ParserFile class ParserFile
# @param options [Hash] options to be configured from file contents # @param options [Hash] options to be configured from file contents
# @param file [nil,IO] configuration file handle, defaults to opening `.github_changelog_generator` # @param file [nil,IO] configuration file handle, defaults to opening `.github_changelog_generator`
def initialize(options, file = read_default_file) def initialize(options, file = open_settings_file)
@options = options @options = options
@file = file @file = file
end end
@ -35,7 +35,7 @@ module GitHubChangelogGenerator
FILENAME = ".github_changelog_generator" FILENAME = ".github_changelog_generator"
def read_default_file def open_settings_file
path = Pathname(File.expand_path(FILENAME)) path = Pathname(File.expand_path(FILENAME))
File.open(path) if path.exist? File.open(path) if path.exist?
end end