Exception: Bundler::PermissionError
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
BundlerError ,
StandardError
|
|
Instance Chain:
self,
BundlerError ,
StandardError
|
|
Inherits: |
Bundler::BundlerError
|
Defined in: | lib/bundler/errors.rb |
Class Method Summary
BundlerError
- Inherited
Instance Method Summary
Constructor Details
.new(path, permission_type = :write) ⇒ PermissionError
# File 'lib/bundler/errors.rb', line 66
def initialize(path, = :write) @path = path @permission_type = end
Instance Method Details
#action
[ GitHub ]# File 'lib/bundler/errors.rb', line 71
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
[ GitHub ]# File 'lib/bundler/errors.rb', line 93
def "There was an error while trying to #{action} `#{@path}`. " \ "It is likely that you need to grant #{}." end
#parent_folder
[ GitHub ]# File 'lib/bundler/errors.rb', line 89
def parent_folder File.dirname(@path) end
#permission_type
[ GitHub ]# File 'lib/bundler/errors.rb', line 80
def case @permission_type when :create "executable permissions for all parent directories and write permissions for `#{parent_folder}`" else "#{@permission_type} permissions for that path" end end