Class: Prickle::Exceptions::Message::ElementNotFound

Inherits:
Object
  • Object
show all
Includes:
Prickle::Exceptions::Message
Defined in:
lib/prickle/exceptions/messages.rb

Instance Method Summary collapse

Constructor Details

#initialize(type = nil, identifier = nil, text = nil, caught_exception = nil) ⇒ ElementNotFound

Returns a new instance of ElementNotFound.



13
14
15
16
17
18
# File 'lib/prickle/exceptions/messages.rb', line 13

def initialize type=nil, identifier=nil, text=nil, caught_exception=nil
  @element_type = type
  @element_identifier = identifier
  @element_text = text
  @caught_exception = caught_exception
end

Instance Method Details

#to_sObject



20
21
22
# File 'lib/prickle/exceptions/messages.rb', line 20

def to_s
  "#{element_text} with identifier #{identifier}#{text_string} was not found.\n\tError: #{@caught_exception.message}"
end