Exception: Varar::Core::CellMismatchError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/varar/core/cell_diff.rb

Overview

Raised when a header-bound row's / a table's returned columns don't match.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cells) ⇒ CellMismatchError

Returns a new instance of CellMismatchError.



25
26
27
28
# File 'lib/varar/core/cell_diff.rb', line 25

def initialize(cells)
  @cells = cells
  super(cells.map { |c| "#{c.column}: expected #{c.expected} but was #{c.actual}" }.join('; '))
end

Instance Attribute Details

#cellsObject (readonly)

Returns the value of attribute cells.



23
24
25
# File 'lib/varar/core/cell_diff.rb', line 23

def cells
  @cells
end