Class: Bwrap::Resolvers::Executable Private
- Inherits:
-
Object
- Object
- Bwrap::Resolvers::Executable
- Defined in:
- lib/bwrap/resolvers/executable.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Resolves for example symlinks and such stuff.
Instance Attribute Summary collapse
-
#executable ⇒ Pathname|nil
private
May be either relative or absolute path.
-
#executable_paths ⇒ Hash<Pathname, :path|:symlink>|nil
readonly
private
If the executable is a symlink, contains each resolved symlink and the real target.
Instance Method Summary collapse
-
#absolute_path? ⇒ Bool
private
Returns true if executable name parsed from command is absolute path, and not only the executable name.
-
#command=(value) ⇒ Object
private
The command given to Bwrap#run.
-
#initialize(command = nil) ⇒ Executable
constructor
private
A new instance of Executable.
Constructor Details
#initialize(command = nil) ⇒ Executable
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Executable.
21 22 23 |
# File 'lib/bwrap/resolvers/executable.rb', line 21 def initialize command = nil self.command = command if command end |
Instance Attribute Details
#executable ⇒ Pathname|nil
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
May be either relative or absolute path. If relative, the path may be invalid.
12 13 14 |
# File 'lib/bwrap/resolvers/executable.rb', line 12 def executable @executable end |
#executable_paths ⇒ Hash<Pathname, :path|:symlink>|nil (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
If the executable is a symlink, contains each resolved symlink and the real target. Otherwise only contains the executable.
18 19 20 |
# File 'lib/bwrap/resolvers/executable.rb', line 18 def executable_paths @executable_paths end |
Instance Method Details
#absolute_path? ⇒ Bool
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns true if executable name parsed from command is absolute path, and not only the executable name.
52 53 54 55 56 |
# File 'lib/bwrap/resolvers/executable.rb', line 52 def absolute_path? return false unless @executable @executable.absolute? end |
#command=(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The command given to Bwrap#run.
28 29 30 31 |
# File 'lib/bwrap/resolvers/executable.rb', line 28 def command= value self.executable = executable_from_command value @raw_command = value end |