Class: AwesomeSpawn::NoSuchFileError

Inherits:
Errno::ENOENT
  • Object
show all
Defined in:
lib/awesome_spawn/no_such_file_error.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ NoSuchFileError

Returns a new instance of NoSuchFileError.



3
4
5
# File 'lib/awesome_spawn/no_such_file_error.rb', line 3

def initialize(message)
  super(message.split("No such file or directory -").last.split(" ").first)
end

Class Method Details

.detected?(message) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/awesome_spawn/no_such_file_error.rb', line 7

def self.detected?(message)
  message.start_with?("No such file or directory -")
end