Method: Spider::Model::FormatError#initialize

Defined in:
lib/spiderfw/model/model.rb

#initialize(element, value, message) ⇒ FormatError

Takes an Element, the value, and a message. The message should be a format specification; it will be %‘d with the value.

error = FormatError.new(my_element, 3, "Element value %s is wrong.")
error.to_s  => "Element value 3 is wrong."

Parameters:



347
348
349
350
351
352
# File 'lib/spiderfw/model/model.rb', line 347

def initialize(element, value, message)
    @element = element
    @message = message
    @value = value
    super(message)
end