Class: ProxyTester::User

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/proxy_tester/models/user.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.load_from(source) ⇒ Object



9
10
11
# File 'lib/proxy_tester/models/user.rb', line 9

def self.load_from(source)
  source.create_users(self)
end

Instance Method Details

#to_login(options = {}) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/proxy_tester/models/user.rb', line 17

def (options = {})
  result = []
  result << name

  if options.key? :cleartext
    result << password
  else
    result << '*' * 4
  end

  result.join(':').shellescape
end

#to_stringObject



13
14
15
# File 'lib/proxy_tester/models/user.rb', line 13

def to_string
  name
end