Exception: Yay::CouldntFindFileError

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

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.



77
78
79
80
# File 'lib/yay/errors.rb', line 77

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

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



74
75
76
# File 'lib/yay/errors.rb', line 74

def filename
  @filename
end

#triedObject (readonly)

Returns the value of attribute tried.



75
76
77
# File 'lib/yay/errors.rb', line 75

def tried
  @tried
end

Instance Method Details

#printable_messageObject



82
83
84
# File 'lib/yay/errors.rb', line 82

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