Exception: Bundler::PermissionError
Instance Method Summary
collapse
all_errors, status_code
Constructor Details
#initialize(path, permission_type = :write) ⇒ PermissionError
63
64
65
66
|
# File 'lib/bundler/errors.rb', line 63
def initialize(path, permission_type = :write)
@path = path
@permission_type = permission_type
end
|
Instance Method Details
#action ⇒ Object
68
69
70
71
72
73
74
75
|
# File 'lib/bundler/errors.rb', line 68
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
77
78
79
80
81
|
# File 'lib/bundler/errors.rb', line 77
def message
"There was an error while trying to #{action} `#{@path}`. " \
"It is likely that you need to grant #{@permission_type} permissions " \
"for that path."
end
|