Class: Starter::Password
- Inherits:
-
String
- Object
- String
- Starter::Password
- Extended by:
- Prompt
- Defined in:
- lib/starter/password.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Password
constructor
A new instance of Password.
- #inspect ⇒ Object
Methods included from Prompt
Constructor Details
#initialize(*args) ⇒ Password
Returns a new instance of Password.
18 19 20 |
# File 'lib/starter/password.rb', line 18 def initialize(*args) super end |
Class Method Details
.request(service) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/starter/password.rb', line 7 def self.request(service) begin system "stty -echo" value = prompt "Password for #{service}:" ensure system "stty echo" puts end self.new(value) end |
Instance Method Details
#inspect ⇒ Object
22 23 24 |
# File 'lib/starter/password.rb', line 22 def inspect "#<Starter::Password>" end |