Skip to content

Commit

Permalink
Rubocop fix - split regexp into more readable parts
Browse files Browse the repository at this point in the history
  • Loading branch information
wendelscardua committed May 29, 2021
1 parent 6df2c21 commit 738d684
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/dotini/ini_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def load(filename,
comment_character: ';',
key_pattern: DEFAULT_KEY_PATTERN,
value_pattern: DEFAULT_VALUE_PATTERN)
line_pattern = /\A(?<key>#{key_pattern})\s*=\s*(?<value>#{value_pattern})(?:\s*(?<inline_comment>#{comment_character}.*))?\z/
line_pattern = /\A(?<key>#{key_pattern})
\s*=\s*
(?<value>#{value_pattern})
(?:\s*(?<inline_comment>#{comment_character}.*))?\z/x
ini_file = IniFile.new
current_section = Section.new(nil)
current_key_value_pair = KeyValuePair.new
Expand Down

0 comments on commit 738d684

Please sign in to comment.