Sha256: 035aeda2691d38b89e35ed7d8845a4aa74486727785ce5360d2d54dd2f3cd3fa

Contents?: true

Size: 290 Bytes

Versions: 6

Compression:

Stored size: 290 Bytes

Contents

# frozen_string_literal: true
module Codebreaker
  module InputHelper
    def user_input(validator)
      input = gets.chomp.downcase
      if valid_input?(input, validator)
        input
      else
        error_massage(validator)
        user_input(validator)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
codebreaker_kolyanjy-0.1.8 lib/modules/input_helper.rb
codebreaker_kolyanjy-0.1.7 lib/modules/input_helper.rb
codebreaker_kolyanjy-0.1.6 lib/modules/input_helper.rb
codebreaker_kolyanjy-0.1.5 lib/modules/input_helper.rb
codebreaker_kolyanjy-0.1.4 lib/modules/input_helper.rb
codebreaker_kolyanjy-0.1.3 lib/modules/input_helper.rb