Exception: Bundler::PermissionError
- Inherits:
-
BundlerError
- Object
- StandardError
- BundlerError
- Bundler::PermissionError
- Defined in:
- lib/bundler/errors.rb
Direct Known Subclasses
Instance Method Summary collapse
- #action ⇒ Object
-
#initialize(path, permission_type = :write) ⇒ PermissionError
constructor
A new instance of PermissionError.
- #message ⇒ Object
Methods inherited from BundlerError
Constructor Details
#initialize(path, permission_type = :write) ⇒ PermissionError
Returns a new instance of PermissionError.
43 44 45 46 |
# File 'lib/bundler/errors.rb', line 43 def initialize(path, = :write) @path = path @permission_type = end |
Instance Method Details
#action ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/bundler/errors.rb', line 48 def action case @permission_type when :read then "read from" when :write then "write to" when :executable, :exec then "execute" else @permission_type.to_s end end |
#message ⇒ Object
57 58 59 60 61 |
# File 'lib/bundler/errors.rb', line 57 def "There was an error while trying to #{action} `#{@path}`. " \ "It is likely that you need to grant #{@permission_type} permissions " \ "for that path." end |