diff options
Diffstat (limited to 'lib/hashie/mash.rb')
-rw-r--r-- | lib/hashie/mash.rb | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb index 39bfd69..a1f8fd8 100644 --- a/lib/hashie/mash.rb +++ b/lib/hashie/mash.rb @@ -41,6 +41,9 @@ module Hashie # mash.author # => <Mash name="Michael Bleigh"> # class Mash < Hashie::Hash + include Hashie::PrettyInspect + alias_method :to_s, :inspect + # If you pass in an existing hash, it will # convert it to a Mash including recursively # descending into arrays and hashes, converting @@ -109,19 +112,6 @@ module Hashie picky_key?(convert_key(key)) end - alias_method :regular_inspect, :inspect - # Prints out a pretty object-like string of the - # defined attributes. - def inspect - ret = "<#{self.class.to_s}" - keys.sort.each do |key| - ret << " #{key}=#{self[key].inspect}" - end - ret << ">" - ret - end - alias_method :to_s, :inspect - # Performs a deep_update on a duplicate of the # current mash. def deep_merge(other_hash) |