Sha256: 1689c342859f1aa767866548a51bbedbb840b2da8703090158833d67c550976b

Contents?: true

Size: 318 Bytes

Versions: 2

Compression:

Stored size: 318 Bytes

Contents

module BBLib
  class OptsParser
    class Command < Option
      attr_of [Integer, Range], :position, default: nil, allow_nil: true, arg_at: 0

      def self.type
        [super, :at]
      end

      def extract(index, args)
        args[index].tap { args[index] = nil }
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bblib-2.0.5 lib/bblib/cli/options/command.rb
bblib-2.0.4 lib/bblib/cli/options/command.rb