Sha256: a88645052199aad0f217fbe9b1fccf150e34ea98e7a27e1fa399e12cb5e1af36

Contents?: true

Size: 569 Bytes

Versions: 88

Compression:

Stored size: 569 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module EacCli
  class Config < ::SimpleDelegator
    class Entry
      module Undefined
        private

        def undefined_value
          loop do
            entry_value = undefined_value_no_loop
            next unless options[:validator].if_present(true) { |v| v.call(entry_value) }

            return entry_value
          end
        end

        def undefined_value_no_loop
          input("Value for entry \"#{path}\"", options.request_input_options)
        end
      end
    end
  end
end

Version data entries

88 entries across 88 versions & 3 rubygems

Version Path
avm-tools-0.120.1 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
avm-tools-0.120.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
avm-tools-0.119.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
avm-tools-0.118.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
avm-tools-0.117.3 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_cli-0.27.5 lib/eac_cli/config/entry/undefined.rb
avm-tools-0.117.2 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_cli-0.27.4 lib/eac_cli/config/entry/undefined.rb
avm-tools-0.117.1 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
avm-tools-0.117.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
avm-tools-0.116.2 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_cli-0.27.3 lib/eac_cli/config/entry/undefined.rb
avm-tools-0.116.1 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_cli-0.27.2 lib/eac_cli/config/entry/undefined.rb
avm-tools-0.116.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_cli-0.27.1 lib/eac_cli/config/entry/undefined.rb
avm-tools-0.115.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_cli-0.27.0 lib/eac_cli/config/entry/undefined.rb
avm-tools-0.114.2 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
avm-tools-0.114.1 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb