class ViewModel::AbstractErrorWithBlame
describing the node to blame.
For errors associated with specific viewmodel nodes, include metadata
def initialize(blame_nodes)
def initialize(blame_nodes) @nodes = Array.wrap(blame_nodes) unless @nodes.all? { |n| n.is_a?(ViewModel::Reference) } raise ArgumentError.new("#{self.class.name}: 'blame_nodes' must all be of type ViewModel::Reference") end super() end
def meta
def meta { nodes: format_references(nodes), } end