Module: Hashie::PrettyInspect
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
35 36 37 38 |
# File 'lib/pancake/vendor/hashie/lib/hashie/hash_extensions.rb', line 35 def self.included(base) base.send :alias_method, :hash_inspect, :inspect base.send :alias_method, :inspect, :hashie_inspect end |
Instance Method Details
#hashie_inspect ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/pancake/vendor/hashie/lib/hashie/hash_extensions.rb', line 40 def hashie_inspect ret = "<##{self.class.to_s}" stringify_keys.keys.sort.each do |key| ret << " #{key}=#{self[key].inspect}" end ret << ">" ret end |