Exception: WifiWand::QrCodeOutputFileError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

#append_help_hint?, #display_message, #exception, #message_for_display

Constructor Details

#initialize(filename:, directory: nil, reason: nil, source: nil) ⇒ QrCodeOutputFileError

Returns a new instance of QrCodeOutputFileError.



199
200
201
202
203
204
205
# File 'lib/wifi_wand/errors.rb', line 199

def initialize(filename:, directory: nil, reason: nil, source: nil)
  @filename = filename
  @directory = normalize_directory(directory || File.dirname(filename))
  @reason = reason
  @source = source
  super(build_message)
end

Instance Attribute Details

#directoryObject (readonly)

Returns the value of attribute directory.



197
198
199
# File 'lib/wifi_wand/errors.rb', line 197

def directory
  @directory
end

#filenameObject (readonly)

Returns the value of attribute filename.



197
198
199
# File 'lib/wifi_wand/errors.rb', line 197

def filename
  @filename
end

#reasonObject (readonly)

Returns the value of attribute reason.



197
198
199
# File 'lib/wifi_wand/errors.rb', line 197

def reason
  @reason
end

#sourceObject (readonly)

Returns the value of attribute source.



197
198
199
# File 'lib/wifi_wand/errors.rb', line 197

def source
  @source
end