Class: Terminalwire::Shells::Shell

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

Overview

This is used to detect what the user is running for a shell. Terminalwire then then uses this information to determine what files to write to for the root policy.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Shell



9
10
11
12
13
14
# File 'lib/terminalwire/shells.rb', line 9

def initialize(name)
  @name = name
  @login_files = Set.new
  @interactive_files = Set.new
  @logout_files = Set.new
end

Instance Attribute Details

#interactive_filesObject (readonly)

Returns the value of attribute interactive_files.



7
8
9
# File 'lib/terminalwire/shells.rb', line 7

def interactive_files
  @interactive_files
end

#login_filesObject (readonly)

Returns the value of attribute login_files.



7
8
9
# File 'lib/terminalwire/shells.rb', line 7

def 
  @login_files
end

#logout_filesObject (readonly)

Returns the value of attribute logout_files.



7
8
9
# File 'lib/terminalwire/shells.rb', line 7

def logout_files
  @logout_files
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/terminalwire/shells.rb', line 7

def name
  @name
end

Instance Method Details

#configure(&block) ⇒ Object



40
41
42
# File 'lib/terminalwire/shells.rb', line 40

def configure(&block)
  Configuration.new(self, &block).shell
end