Class: Terminalwire::Shells::Shell::Configuration
- Inherits:
-
Object
- Object
- Terminalwire::Shells::Shell::Configuration
- Defined in:
- lib/terminalwire/shells.rb
Instance Attribute Summary collapse
-
#shell ⇒ Object
readonly
Returns the value of attribute shell.
Instance Method Summary collapse
-
#initialize(shell, &block) ⇒ Configuration
constructor
A new instance of Configuration.
- #interactive_file(*paths) ⇒ Object (also: #interactive_files)
- #login_file(*paths) ⇒ Object (also: #login_files)
- #logout_file(*paths) ⇒ Object (also: #logout_files)
Constructor Details
#initialize(shell, &block) ⇒ Configuration
Returns a new instance of Configuration.
19 20 21 22 |
# File 'lib/terminalwire/shells.rb', line 19 def initialize(shell, &block) @shell = shell instance_eval(&block) if block_given? end |
Instance Attribute Details
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
17 18 19 |
# File 'lib/terminalwire/shells.rb', line 17 def shell @shell end |
Instance Method Details
#interactive_file(*paths) ⇒ Object Also known as: interactive_files
29 30 31 |
# File 'lib/terminalwire/shells.rb', line 29 def interactive_file(*paths) shell.interactive_files.merge paths.flatten end |
#login_file(*paths) ⇒ Object Also known as: login_files
24 25 26 |
# File 'lib/terminalwire/shells.rb', line 24 def login_file(*paths) shell.login_files.merge paths.flatten end |
#logout_file(*paths) ⇒ Object Also known as: logout_files
34 35 36 |
# File 'lib/terminalwire/shells.rb', line 34 def logout_file(*paths) shell.logout_files.merge paths.flatten end |