Class: Terminalwire::Shells::Shell::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/terminalwire/shells.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#shellObject (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 (*paths)
  shell..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