Sha256: d79392573f1c926d33db1ec571c826749dbe5526bb9a5afea26ddf68089c74f6

Contents?: true

Size: 692 Bytes

Versions: 4

Compression:

Stored size: 692 Bytes

Contents

# frozen_string_literal: true

require "runcom"

module SublimeTextKit
  module CLI
    module Parsers
      # Assembles and parses all Command Line Interface (CLI) options.
      class Assembler
        def initialize section: Core, client: CLIENT, container: Container
          @section = section
          @client = client
          @container = container
        end

        def call arguments = []
          section.call client: client
          client.parse! arguments
          configuration
        end

        def to_s = client.to_s

        private

        attr_reader :section, :client, :container

        def configuration = container[__method__]
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sublime_text_kit-11.0.3 lib/sublime_text_kit/cli/parsers/assembler.rb
sublime_text_kit-11.0.2 lib/sublime_text_kit/cli/parsers/assembler.rb
sublime_text_kit-11.0.1 lib/sublime_text_kit/cli/parsers/assembler.rb
sublime_text_kit-11.0.0 lib/sublime_text_kit/cli/parsers/assembler.rb