Class: HrrRbSftp::Protocol::Version3::Extensions::Extension
- Inherits:
-
Object
- Object
- HrrRbSftp::Protocol::Version3::Extensions::Extension
- Includes:
- Loggable
- Defined in:
- lib/hrr_rb_sftp/protocol/version3/extensions/extension.rb
Overview
This class implements base extension operations and is to be inherited by each extension class.
Direct Known Subclasses
FsyncAtOpensshCom, HardlinkAtOpensshCom, LsetstatAtOpensshCom, PosixRenameAtOpensshCom
Instance Attribute Summary
Attributes included from Loggable
Instance Method Summary collapse
-
#context ⇒ Hash
Returns contextual variables.
-
#handles ⇒ Hash{String=>File, Dir}
Returns opened handles.
-
#initialize(context, logger: nil) ⇒ Extension
constructor
Returns a new instance of a class that includes this module.
-
#version ⇒ Integer
Returns Negotiated protocol version.
Methods included from Loggable
#log_debug, #log_error, #log_fatal, #log_info, #log_warn
Constructor Details
#initialize(context, logger: nil) ⇒ Extension
Returns a new instance of a class that includes this module.
20 21 22 23 24 |
# File 'lib/hrr_rb_sftp/protocol/version3/extensions/extension.rb', line 20 def initialize context, logger: nil self.logger = logger @context = context end |
Instance Method Details
#context ⇒ Hash
Returns contextual variables.
33 34 35 |
# File 'lib/hrr_rb_sftp/protocol/version3/extensions/extension.rb', line 33 def context @context end |
#handles ⇒ Hash{String=>File, Dir}
Returns opened handles.
51 52 53 |
# File 'lib/hrr_rb_sftp/protocol/version3/extensions/extension.rb', line 51 def handles @context[:handles] end |
#version ⇒ Integer
Returns Negotiated protocol version.
42 43 44 |
# File 'lib/hrr_rb_sftp/protocol/version3/extensions/extension.rb', line 42 def version @context[:version] end |