class Bundler::Thor::Options
def current_is_switch?
Two booleans are returned. The first is true if the current value
Check if the current value in peek is a registered switch.
def current_is_switch? return [false, false] if @is_treated_as_value case peek when LONG_RE, SHORT_RE, EQ_RE, SHORT_NUM [true, switch?($1)] when SHORT_SQ_RE [true, $1.split("").any? { |f| switch?("-#{f}") }] else [false, false] end end