module RBS::Test::Guaranteed::Inspect
Constants
- EQUAL
- INSPECT
Public Instance Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/test/guaranteed.rb, line 11 def guaranteed_inspect(obj) obj.inspect rescue NoMethodError INSPECT.bind_call(obj) end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/test/guaranteed.rb, line 17 def inspect string = "<#{self.class.name}:" instance_variables.each_with_index do |variable, index| string.concat ', ' unless index.zero? string.concat "#{variable}: #{guaranteed_inspect(instance_variable_get(variable))}" end string.concat '>' end