Exception: SuperDiff::ObjectInspection::InspectionTree::DisallowedNodeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/super_diff/object_inspection/inspection_tree.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_message = nil) ⇒ DisallowedNodeError

Returns a new instance of DisallowedNodeError.



235
236
237
# File 'lib/super_diff/object_inspection/inspection_tree.rb', line 235

def initialize(_message = nil)
  super("#{node_name} is not allowed to be used here!")
end

Instance Attribute Details

#node_nameObject

Returns the value of attribute node_name.



233
234
235
# File 'lib/super_diff/object_inspection/inspection_tree.rb', line 233

def node_name
  @node_name
end

Class Method Details

.create(node_name:) ⇒ Object



226
227
228
229
230
231
# File 'lib/super_diff/object_inspection/inspection_tree.rb', line 226

def self.create(node_name:)
  allocate.tap do |error|
    error.node_name = node_name
    error.__send__(:initialize)
  end
end