Class: Bwrap::Args::Namespace

Inherits:
Object
  • Object
show all
Includes:
Output
Defined in:
lib/bwrap/args/namespace.rb

Overview

Namespace related arguments.

Mostly for handling –unshare-*

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Output

debug?, debug_output, error_output, handle_output_options, info_output, quiet?, trace?, trace_output, verb_output, verbose?, warn_output

Constructor Details

#initialize(args) ⇒ Namespace

Returns a new instance of Namespace.

Parameters:



16
17
18
# File 'lib/bwrap/args/namespace.rb', line 16

def initialize args
  @args = args
end

Instance Attribute Details

#config=(value) ⇒ Object (writeonly)

Instance of Config.



13
14
15
# File 'lib/bwrap/args/namespace.rb', line 13

def config=(value)
  @config = value
end

Instance Method Details

#sharesObject



20
21
22
23
24
# File 'lib/bwrap/args/namespace.rb', line 20

def shares
  return unless @config&.unshare_all

  @args.add :unshare_all, "--unshare-all" # Practically means that there would be nothing in the sandbox by default.
end