Class: Proxy::RemoteExecution::Ssh::Runners::SensitiveString

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_proxy_remote_execution_ssh/multiplexed_ssh_connection.rb

Instance Method Summary collapse

Constructor Details

#initialize(value, mask: '*****') ⇒ SensitiveString

Returns a new instance of SensitiveString.



5
6
7
8
# File 'lib/smart_proxy_remote_execution_ssh/multiplexed_ssh_connection.rb', line 5

def initialize(value, mask: '*****')
  @value = value
  @mask = mask
end

Instance Method Details

#inspectObject



10
11
12
# File 'lib/smart_proxy_remote_execution_ssh/multiplexed_ssh_connection.rb', line 10

def inspect
  '"' + to_s + '"'
end

#to_sObject



14
15
16
# File 'lib/smart_proxy_remote_execution_ssh/multiplexed_ssh_connection.rb', line 14

def to_s
  @mask
end

#to_strObject



18
19
20
# File 'lib/smart_proxy_remote_execution_ssh/multiplexed_ssh_connection.rb', line 18

def to_str
  @value
end