class Prickle::Exceptions::Message::ElementNotFound
Public Class Methods
new(type=nil, identifier=nil, text=nil, caught_exception=nil)
click to toggle source
# 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
Public Instance Methods
to_s()
click to toggle source
# 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
Private Instance Methods
element_text()
click to toggle source
# File lib/prickle/exceptions/messages.rb, line 26 def element_text return highlight(@element_type) unless @element_type == "*" "Element" end
identifier()
click to toggle source
# File lib/prickle/exceptions/messages.rb, line 35 def identifier highlight(@element_identifier.to_s) end
text_string()
click to toggle source
# File lib/prickle/exceptions/messages.rb, line 31 def text_string " and text #{highlight(@element_text)}" unless @element_text.nil? end