Class: HrrRbSsh::Connection::Channel::ChannelType::Session::RequestType::Shell::Context
- Inherits:
-
Object
- Object
- HrrRbSsh::Connection::Channel::ChannelType::Session::RequestType::Shell::Context
- Includes:
- Loggable
- Defined in:
- lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/shell/context.rb
Instance Attribute Summary collapse
-
#io ⇒ Object
readonly
Returns the value of attribute io.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
-
#vars ⇒ Object
readonly
Returns the value of attribute vars.
Attributes included from Loggable
Instance Method Summary collapse
- #chain_proc(&block) ⇒ Object
- #close_session ⇒ Object
-
#initialize(proc_chain, username, io, variables, message, session, logger: nil) ⇒ Context
constructor
A new instance of Context.
Methods included from Loggable
#log_debug, #log_error, #log_fatal, #log_info, #log_warn
Constructor Details
#initialize(proc_chain, username, io, variables, message, session, logger: nil) ⇒ Context
Returns a new instance of Context.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/shell/context.rb', line 22 def initialize proc_chain, username, io, variables, , session, logger: nil self.logger = logger @proc_chain = proc_chain @username = username @io = io @variables = variables @vars = variables @session = session end |
Instance Attribute Details
#io ⇒ Object (readonly)
Returns the value of attribute io.
16 17 18 |
# File 'lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/shell/context.rb', line 16 def io @io end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
16 17 18 |
# File 'lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/shell/context.rb', line 16 def username @username end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
16 17 18 |
# File 'lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/shell/context.rb', line 16 def variables @variables end |
#vars ⇒ Object (readonly)
Returns the value of attribute vars.
16 17 18 |
# File 'lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/shell/context.rb', line 16 def vars @vars end |
Instance Method Details
#chain_proc(&block) ⇒ Object
33 34 35 |
# File 'lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/shell/context.rb', line 33 def chain_proc &block @proc = block || @proc end |
#close_session ⇒ Object
37 38 39 |
# File 'lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/shell/context.rb', line 37 def close_session @session.close end |