lib/coco/options/group.rb in coveragebook_components-0.8.2 vs lib/coco/options/group.rb in coveragebook_components-0.8.3

- old
+ new

@@ -52,26 +52,26 @@ def get_option_value(...) get_option!(...).value end - def set_option_value(*args, value) - if option?(*args) - get_option(*args).value = value - elsif group?(*args) - group = get_group(*args) + def set_option_value(*, value) + if option?(*) + get_option(*).value = value + elsif group?(*) + group = get_group(*) if group.shorthand group.set_option_value(group.shorthand, value) end end end - def option_value_equals?(*args, check) - get_option_value(*args) == check + def option_value_equals?(*, check) + get_option_value(*) == check end - def merge_option_values(*args, values, overwrite: true) - get_group!(*args).items.each do |item| + def merge_option_values(*, values, overwrite: true) + get_group!(*).items.each do |item| if values.key?(item.name) value = values[item.name] if item.is_a?(Option) item.value = value if overwrite || item.undefined? elsif value.is_a?(Hash) || item.shorthand