Exception: Gem::FilePermissionError

Inherits:
Exception show all
Defined in:
lib/rubygems/exceptions.rb

Overview

Signals that a file permission error is preventing the user from operating on the given directory.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(directory) ⇒ FilePermissionError

Returns a new instance of FilePermissionError.



63
64
65
66
67
# File 'lib/rubygems/exceptions.rb', line 63

def initialize(directory)
  @directory = directory

  super "You don't have write permissions for the #{directory} directory."
end

Instance Attribute Details

#directoryObject (readonly)

Returns the value of attribute directory.



61
62
63
# File 'lib/rubygems/exceptions.rb', line 61

def directory
  @directory
end