Sha256: 114c94dd8a73d3a2306afec2e7a54d5913f4dbc37bbdf3675183f8f6355383d9

Contents?: true

Size: 407 Bytes

Versions: 6

Compression:

Stored size: 407 Bytes

Contents

# frozen_string_literal: true

require 'eac_cli/definition/option'

module EacCli
  class Definition
    class ArgumentOption < ::EacCli::Definition::Option
      def argument?
        true
      end

      def build_value(new_value, previous_value)
        repeat? ? previous_value + [new_value] : new_value
      end

      def default_default_value
        repeat? ? [] : nil
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
eac_cli-0.42.0 lib/eac_cli/definition/argument_option.rb
eac_cli-0.40.1 lib/eac_cli/definition/argument_option.rb
eac_cli-0.40.0 lib/eac_cli/definition/argument_option.rb
eac_cli-0.39.0 lib/eac_cli/definition/argument_option.rb
eac_cli-0.38.1 lib/eac_cli/definition/argument_option.rb
eac_tools-0.82.0 sub/eac_cli/lib/eac_cli/definition/argument_option.rb