Class: HrrRbSsh::Authentication::Method::None::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/hrr_rb_ssh/authentication/method/none/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username, variables, authentication_methods) ⇒ Context

Returns a new instance of Context.



17
18
19
20
21
22
23
24
# File 'lib/hrr_rb_ssh/authentication/method/none/context.rb', line 17

def initialize username, variables, authentication_methods
  @username = username
  @variables = variables
  @vars = variables
  @authentication_methods = authentication_methods

  @logger = Logger.new self.class.name
end

Instance Attribute Details

#authentication_methodsObject (readonly)

Returns the value of attribute authentication_methods.



11
12
13
# File 'lib/hrr_rb_ssh/authentication/method/none/context.rb', line 11

def authentication_methods
  @authentication_methods
end

#usernameObject (readonly)

Returns the value of attribute username.



11
12
13
# File 'lib/hrr_rb_ssh/authentication/method/none/context.rb', line 11

def username
  @username
end

#variablesObject (readonly)

Returns the value of attribute variables.



11
12
13
# File 'lib/hrr_rb_ssh/authentication/method/none/context.rb', line 11

def variables
  @variables
end

#varsObject (readonly)

Returns the value of attribute vars.



11
12
13
# File 'lib/hrr_rb_ssh/authentication/method/none/context.rb', line 11

def vars
  @vars
end

Instance Method Details

#verify(username) ⇒ Object



26
27
28
29
30
# File 'lib/hrr_rb_ssh/authentication/method/none/context.rb', line 26

def verify username
  @logger.info { "verify username" }
  @logger.debug { "username is #{username}, @username is #{@username}" }
  username == @username
end