module SublimeDSL::Tools::StableInspect
A mix-in redefining inspect
so that it does not depend on to_s.
Public Instance Methods
inspect()
click to toggle source
Method not calling to_s, and producing the standard inspect
output.
# File lib/sublime_dsl/tools/stable_inspect.rb, line 11 def inspect '#<' << self.class.name << ':0x' << '%x' % (object_id << 1) << instance_variables.map { |v| " #{v}=#{instance_variable_get(v).inspect}" }.join(',') << '>' end