lib/env_opts.rb in markdown_exec-1.3.3.5 vs lib/env_opts.rb in markdown_exec-1.3.6
- old
+ new
@@ -91,13 +91,13 @@
return self if argv.nil? || !(argv&.count || 0).positive?
args_ind = 0
while args_ind < argv.count
args_consumed = 0
- arg = argv.fetch(args_ind, '') #.tap_inspect 'argument', source: 'EnvOpts'
+ arg = argv.fetch(args_ind, '')
if arg.start_with? '--'
- opt_name = arg[2..-1] #.tap_inspect 'opt_name', source: 'EnvOpts'
+ opt_name = arg[2..-1]
args_consumed = consume_arguments(opt_name,
argv.fetch(args_ind + 1, nil))
end
if args_consumed.zero?
@@ -134,19 +134,19 @@
# symbol name to option name
# option names use hyphens
#
def self.symbol_name_to_option_name(name)
- name.to_s.gsub('_', '-') #.tap_inspect
+ name.to_s.gsub('_', '-')
end
private
# convert key name or symbol to an option name
#
def key_name_to_option_name(key)
- (key.is_a?(Symbol) ? EnvOpts.symbol_name_to_option_name(key) : key) #.tap_inspect
+ (key.is_a?(Symbol) ? EnvOpts.symbol_name_to_option_name(key) : key)
end
# get cast of environment variable
#
def option_cast(opt_raw)
@@ -173,11 +173,11 @@
end
# option names use hyphens
#
def method_name_to_option_name(name)
- name.to_s.gsub('_', '-') #.tap_inspect
+ name.to_s.gsub('_', '-')
end
# read and write options using the option name as a method
#
def method_missing(method_name, *args)
@@ -185,10 +185,10 @@
value = args.first
name = method_name_to_option_name(method_name.to_s[0..-2])
set_key_value_as_cast(name, value)
else
@values[method_name_to_option_name(method_name)]
- end #.tap_inspect "ref #{method_name}", source: 'EnvOpts'
+ end
end
# option name to environment name
# if true or empty, compute from option name
#