Class: Ghaki::Account::WinDos

Inherits:
Base
  • Object
show all
Includes:
DomainAddress, UserDomain
Defined in:
lib/ghaki/account/windos.rb

Constant Summary

Constants included from UserDomain

UserDomain::USERDOMAIN_RETRY_MAX

Constants included from Password

Password::ASK_PASSWORD_RETRY_MAX

Constants included from Username

Username::USERNAME_RETRY_MAX

Constants included from Hostname

Hostname::HOSTNAME_RETRY_MAX

Instance Attribute Summary

Attributes included from DomainAddress

#domain_address

Attributes included from UserDomain

#userdomain

Attributes included from EMailAddress

#email_address

Attributes included from Username

#username

Attributes included from Hostname

#hostname

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SynOpts

#attr_syn_opts

Methods included from UserDomain

#ask_userdomain, get_env, #valid_userdomain?

Methods inherited from Base

#ask_all, #collapse_opts, #initialize

Methods included from Password

#ask_password, #fail_password, #failed_passwords?, #opt_password, #password, #passwords, #passwords=, #reset_passwords, #retry_password?, #valid_password?

Methods included from Username

#ask_username, get_env, #valid_username?

Methods included from Hostname

#ask_hostname, get_env, #valid_hostname?

Constructor Details

This class inherits a constructor from Ghaki::Account::Base

Class Method Details

.from_opts(opts) ⇒ Object




18
19
20
# File 'lib/ghaki/account/windos.rb', line 18

def self.from_opts opts
  opts[:account] || WinDos.new(opts)
end

.purge_opts(opts) ⇒ Object




23
24
25
26
27
# File 'lib/ghaki/account/windos.rb', line 23

def self.purge_opts opts ; super opts
  UserDomain.purge_opts opts
  DomainAddress.purge_opts opts
  opts
end

Instance Method Details

#expand_opts(opts = {}) ⇒ Object




34
35
36
37
38
# File 'lib/ghaki/account/windos.rb', line 34

def expand_opts opts={} ; super opts
  opts[:userdomain]     = @userdomain     unless @userdomain.nil?
  opts[:domain_address] = @domain_address unless @domain_address.nil?
  opts
end

#to_sObject




41
42
43
# File 'lib/ghaki/account/windos.rb', line 41

def to_s
  "\\\\" + (@userdomain || '*') + "\\" + (@username || '*')
end