Sha256: e3017e4fb3fd37db50ee2b73aee8fd61084209c99e339f10619882ac545bf42f

Contents?: true

Size: 407 Bytes

Versions: 1

Compression:

Stored size: 407 Bytes

Contents

module BBLib
  class OptsParser
    class BasicOption < Option

      def extract(index, args)
        args.delete_at(index)
        raise MissingArgumentException, "No argument was provided for #{name}" if args[index].nil?
        format_value(args.delete_at(index).to_s)
      end

      protected

      def format_value(value)
        raise AbstractError
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bblib-2.0.3 lib/bblib/cli/options/basic_option.rb