Module: SublimeDSL::Tools::StableInspect
- Included in:
- SublimeDSL::TextMate::Snippet
- Defined in:
- lib/sublime_dsl/tools/stable_inspect.rb
Overview
A mix-in redefining #inspect so that it does not depend on #to_s.
Instance Method Summary collapse
-
#inspect ⇒ Object
Method not calling #to_s, and producing the standard #inspect output.
Instance Method Details
#inspect ⇒ Object
Method not calling #to_s, and producing the standard #inspect output.
11 12 13 14 15 |
# 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 |