class Dry::Monads::SuperDiff::Tuple::Dict::OTFlatteners::MonasAsCollectionConstructor::RegularConstructor::TupleConstructor::OT::RegularConstructor::TupleConstructor::Tuple::Dict::OTBuilders::CompareDefault::Differs::CompareDefault::CompareTuples::ITBuilders::RegularConstructor
Public Class Methods
Source
# File lib/dry/monads/extensions/super_diff.rb, line 258 def self.applies_to?(object) VALUES.include?(object.class) end
Public Instance Methods
Source
# File lib/dry/monads/extensions/super_diff.rb, line 262 def call build_tree do |t2| t2.add_text("#{TOKEN_MAP[object.class]}(") v = EXTRACT_VALUE.(object) unless Unit.equal?(v) t2.nested do |t3| t3.add_inspection_of v end end t2.add_text(")") end end
Private Instance Methods
Source
# File lib/dry/monads/extensions/super_diff.rb, line 280 def build_tree(&block) ::SuperDiff::Core::InspectionTree.new do |t1| t1.as_lines_when_rendering_to_lines( collection_bookend: :open, &block ) end end