Sha256: a787734b6603b0de4e9a2396f8843ac77395f18dbb5027477a2b6694eb34cd47
Contents?: true
Size: 899 Bytes
Versions: 11
Compression:
Stored size: 899 Bytes
Contents
# frozen_string_literal: true module Pennyworth module CLI module Parsers # Handles parsing of Command Line Interface (CLI) RubyGems options. class RubyGems def self.call(...) = new(...).call def initialize configuration = Container[:configuration], client: Parser::CLIENT @configuration = configuration @client = client end def call arguments = [] client.separator "\nRUBYGEMS OPTIONS:\n" add_owner client.parse arguments configuration end private attr_reader :configuration, :client def add_owner client.on "--owner [HANDLE]", %(Set owner. Default: "#{owner}".) do |handle| configuration.ruby_gems_owner = handle || owner end end def owner = configuration.ruby_gems_owner end end end end
Version data entries
11 entries across 11 versions & 1 rubygems