Class: HrrRbSsh::Authentication::Authenticator

Inherits:
Object
  • Object
show all
Defined in:
lib/hrr_rb_ssh/authentication/authenticator.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Authenticator

Returns a new instance of Authenticator.



7
8
9
# File 'lib/hrr_rb_ssh/authentication/authenticator.rb', line 7

def initialize &block
  @proc = block
end

Instance Method Details

#authenticate(context) ⇒ Object



11
12
13
# File 'lib/hrr_rb_ssh/authentication/authenticator.rb', line 11

def authenticate context
  @proc.call context
end