Class: Avmtrf1::ActiveDirectory::User
- Inherits:
-
Object
- Object
- Avmtrf1::ActiveDirectory::User
- Defined in:
- lib/avmtrf1/active_directory/user.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(domain, username, password) ⇒ User
constructor
A new instance of User.
- #username_with_domain ⇒ Object
Constructor Details
#initialize(domain, username, password) ⇒ User
Returns a new instance of User.
17 18 19 20 21 |
# File 'lib/avmtrf1/active_directory/user.rb', line 17 def initialize(domain, username, password) @domain = domain @username = username @password = password end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
15 16 17 |
# File 'lib/avmtrf1/active_directory/user.rb', line 15 def domain @domain end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
15 16 17 |
# File 'lib/avmtrf1/active_directory/user.rb', line 15 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
15 16 17 |
# File 'lib/avmtrf1/active_directory/user.rb', line 15 def username @username end |
Class Method Details
.by_configs(path_prefix) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/avmtrf1/active_directory/user.rb', line 7 def by_configs(path_prefix) new( ::EacConfig::Node.context.current.entry("#{path_prefix}.domain").value, ::EacConfig::Node.context.current.entry("#{path_prefix}.username").value, ::EacConfig::Node.context.current.entry("#{path_prefix}.password", noecho: true).value ) end |
Instance Method Details
#username_with_domain ⇒ Object
23 24 25 |
# File 'lib/avmtrf1/active_directory/user.rb', line 23 def username_with_domain "#{domain}\\#{username}" end |