Exception: Oselvar::Var::Core::CellMismatchError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/oselvar/var/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.



26
27
28
29
# File 'lib/oselvar/var/core/cell_diff.rb', line 26

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.



24
25
26
# File 'lib/oselvar/var/core/cell_diff.rb', line 24

def cells
  @cells
end