Exception: Yay::CouldntFindFileError

Inherits:
Error
  • Object
show all
Defined in:
lib/yay/errors.rb

Overview

raised when include file resolution has failed

Instance Attribute Summary collapse

Attributes inherited from Error

#position

Instance Method Summary collapse

Methods inherited from Error

#printable_position

Constructor Details

#initialize(filename, tried) ⇒ CouldntFindFileError

Returns a new instance of CouldntFindFileError.



127
128
129
130
# File 'lib/yay/errors.rb', line 127

def initialize filename, tried
  @filename = filename
  @tried    = tried
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



124
125
126
# File 'lib/yay/errors.rb', line 124

def filename
  @filename
end

#triedObject (readonly)

Returns the value of attribute tried.



125
126
127
# File 'lib/yay/errors.rb', line 125

def tried
  @tried
end

Instance Method Details

#printable_messageObject



132
133
134
# File 'lib/yay/errors.rb', line 132

def printable_message
  return "Failed to load file \"#{filename}\"#{printable_position}\nPlaced looked:\n #{tried.join("\n ")}"
end