Sha256: 85bc09e2b1e8da990b2036897653d57c1246bfeb2dd1d95f94041275acae1fa7
Contents?: true
Size: 818 Bytes
Versions: 7
Compression:
Stored size: 818 Bytes
Contents
# frozen_string_literal: true require "optparse" module SublimeTextKit module CLI # Assembles and parses all Command Line Interface (CLI) options. class Parser include Import[:configuration] CLIENT = OptionParser.new nil, 40, " " def initialize section: Parsers::Core, client: CLIENT, **dependencies super(**dependencies) @section = section @client = client @configuration_duplicate = configuration.dup end def call arguments = [] section.call configuration_duplicate, client: client client.parse arguments configuration_duplicate.freeze end def to_s = client.to_s private attr_reader :section, :client, :configuration_duplicate end end end
Version data entries
7 entries across 7 versions & 1 rubygems