Sha256: 92a50fb3a9a877320930586ea25cc1e85fa721c1efd7472aff3f63a8b5c1eaf8
Contents?: true
Size: 381 Bytes
Versions: 17
Compression:
Stored size: 381 Bytes
Contents
# https://github.com/injekt/slop/pull/110 class Slop def extract_long_flag(objects, config) flag = objects.first.to_s if flag =~ /\A(?:--?)?[a-zA-Z0-9][a-zA-Z0-9_.-]+\=?\??\z/ config[:argument] ||= true if flag.end_with?('=') config[:optional_argument] = true if flag.end_with?('=?') objects.shift clean(flag).sub(/\=\??\z/, '') end end end
Version data entries
17 entries across 17 versions & 1 rubygems