Class: Bwrap::Args::User
- Inherits:
-
Object
- Object
- Bwrap::Args::User
- Includes:
- Output
- Defined in:
- lib/bwrap/args/user.rb
Overview
User related arguments.
Instance Attribute Summary collapse
-
#config ⇒ Object
writeonly
Instance of Config.
Instance Method Summary collapse
-
#create_user_dir ⇒ Object
Arguments to create ‘/run/user/##uid`.
-
#initialize(args) ⇒ User
constructor
A new instance of User.
-
#read_only_pulseaudio ⇒ Object
Arguments to bind necessary pulseaudio data for audio support.
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) ⇒ User
Returns a new instance of User.
14 15 16 |
# File 'lib/bwrap/args/user.rb', line 14 def initialize args @args = args end |
Instance Attribute Details
#config=(value) ⇒ Object (writeonly)
Instance of Config.
11 12 13 |
# File 'lib/bwrap/args/user.rb', line 11 def config=(value) @config = value end |
Instance Method Details
#create_user_dir ⇒ Object
Arguments to create ‘/run/user/##uid`.
19 20 21 22 |
# File 'lib/bwrap/args/user.rb', line 19 def create_user_dir trace "Creating directory /run/user/#{uid}" @args.add :user_dir, %W{ --dir /run/user/#{uid} } end |
#read_only_pulseaudio ⇒ Object
Arguments to bind necessary pulseaudio data for audio support.
25 26 27 28 29 30 |
# File 'lib/bwrap/args/user.rb', line 25 def read_only_pulseaudio return unless @config&.audio&.include? :pulseaudio debug "Binding pulseaudio" @args.add :audio, %W{ --ro-bind /run/user/#{uid}/pulse /run/user/#{uid}/pulse } end |