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
eac_tools-0.45.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.44.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.43.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_cli-0.29.0 lib/eac_cli/config/entry/undefined.rb
eac_tools-0.42.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.41.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.40.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.39.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.38.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.37.2 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.37.1 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.37.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.36.1 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.36.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.35.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.34.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.33.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.32.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.31.1 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb
eac_tools-0.31.0 sub/eac_cli/lib/eac_cli/config/entry/undefined.rb