Exception: Yay::BadFilenameError

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

Overview

thrown when an invalid filename was entered

Instance Attribute Summary collapse

Attributes inherited from Error

#position

Instance Method Summary collapse

Methods inherited from Error

#printable_position

Constructor Details

#initialize(value) ⇒ BadFilenameError

Returns a new instance of BadFilenameError.



29
30
31
# File 'lib/yay/errors.rb', line 29

def initialize value
  @value   = value
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



27
28
29
# File 'lib/yay/errors.rb', line 27

def message
  @message
end

#valueObject (readonly)

Returns the value of attribute value.



26
27
28
# File 'lib/yay/errors.rb', line 26

def value
  @value
end

Instance Method Details

#printable_messageObject



33
34
35
# File 'lib/yay/errors.rb', line 33

def printable_message
  return "Invalid filename #{value} entered"
end