class EnvLint::EnvKeyParser
Public Instance Methods
parse_args(args)
click to toggle source
# File lib/env_lint/env_key_parser.rb, line 3 def parse_args(args) args.map { |arg| arg.split('=').first if arg.include?('=') }.compact end
parse_export_output(text)
click to toggle source
# File lib/env_lint/env_key_parser.rb, line 7 def parse_export_output(text) parse_args(text.split(/[\n\r]/).map { |line| line.gsub('declare -x', '').strip }) end