Sha256: 4003ec8a301a40d357721eec82c66202cb67094b87cf0ac4237c86aa7122b12d

Contents?: true

Size: 374 Bytes

Versions: 20

Compression:

Stored size: 374 Bytes

Contents

require 'io/console'

class UserProvider
  requires :command

  def value
    name = get_name
    password = get_password
    Map name: name, password: password
  end

  private

  def get_name
    command.output.print "Username: "
    command.input.gets.chomp
  end

  def get_password
    command.output.print "Password: "
    command.input.noecho(&:gets).chomp
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rumm-0.0.23 app/providers/user_provider.rb
rumm-0.0.22 app/providers/user_provider.rb
rumm-0.0.21 app/providers/user_provider.rb
rumm-0.0.20 app/providers/user_provider.rb
rumm-0.0.19 app/providers/user_provider.rb
rumm-0.0.18 app/providers/user_provider.rb
rumm-0.0.17 app/providers/user_provider.rb
rumm-0.0.16 app/providers/user_provider.rb
rumm-0.0.15 app/providers/user_provider.rb
rumm-0.0.14 app/providers/user_provider.rb
rumm-0.0.13 app/providers/user_provider.rb
rumm-0.0.12 app/providers/user_provider.rb
rumm-0.0.11 app/providers/user_provider.rb
rumm-0.0.10 app/providers/user_provider.rb
rumm-0.0.9 app/providers/user_provider.rb
rumm-0.0.8 app/providers/user_provider.rb
rumm-0.0.7 app/providers/user_provider.rb
rumm-0.0.6 app/providers/user_provider.rb
rumm-0.0.5 app/providers/user_provider.rb
rumm-0.0.4 app/providers/user_provider.rb