lib/pragmater/cli/parser.rb in pragmater-12.0.0 vs lib/pragmater/cli/parser.rb in pragmater-12.1.0

- old
+ new

@@ -1,7 +1,8 @@ # frozen_string_literal: true +require "core" require "optparse" module Pragmater module CLI # Assembles and parses all Command Line Interface (CLI) options. @@ -16,10 +17,10 @@ @sections = sections @client = client @configuration_duplicate = configuration.dup end - def call arguments = [] + def call arguments = Core::EMPTY_ARRAY sections.each { |section| section.call configuration_duplicate, client: } client.parse arguments configuration_duplicate.freeze end