Exception: KafoParsers::ParserNotAvailable

Inherits:
StandardError
  • Object
show all
Defined in:
lib/kafo_parsers/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(wrapped) ⇒ ParserNotAvailable

Returns a new instance of ParserNotAvailable.



10
11
12
13
14
15
16
# File 'lib/kafo_parsers/exceptions.rb', line 10

def initialize(wrapped)
  if wrapped.is_a?(Exception)
    @wrapped = wrapped
  else
    @message = wrapped
  end
end

Instance Method Details

#messageObject



18
19
20
# File 'lib/kafo_parsers/exceptions.rb', line 18

def message
  @message || @wrapped.message
end