diff options
-rw-r--r-- | lib/hashie/dash.rb | 4 | ||||
-rw-r--r-- | lib/hashie/extensions/indifferent_access.rb | 4 | ||||
-rw-r--r-- | lib/hashie/hash.rb | 6 | ||||
-rw-r--r-- | lib/hashie/mash.rb | 2 | ||||
-rw-r--r-- | lib/hashie/trash.rb | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/lib/hashie/dash.rb b/lib/hashie/dash.rb index cbfc1f5..601227c 100644 --- a/lib/hashie/dash.rb +++ b/lib/hashie/dash.rb @@ -12,8 +12,8 @@ module Hashie # # It is preferrable to a Struct because of the in-class # API for defining properties as well as per-property defaults. - class Dash < Hashie::Hash - include Hashie::PrettyInspect + class Dash < Hash + include PrettyInspect alias_method :to_s, :inspect # Defines a property on the Dash. Options are diff --git a/lib/hashie/extensions/indifferent_access.rb b/lib/hashie/extensions/indifferent_access.rb index ebb4fe7..56af066 100644 --- a/lib/hashie/extensions/indifferent_access.rb +++ b/lib/hashie/extensions/indifferent_access.rb @@ -42,7 +42,7 @@ module Hashie # a hash without modifying the actual class. This is what # allows IndifferentAccess to spread to sub-hashes. def self.inject!(hash) - (class << hash; self; end).send :include, Hashie::Extensions::IndifferentAccess + (class << hash; self; end).send :include, IndifferentAccess hash.convert! end @@ -68,7 +68,7 @@ module Hashie def convert_value(value) if hash_lacking_indifference?(value) - Hashie::Extensions::IndifferentAccess.inject(value.dup) + IndifferentAccess.inject(value.dup) elsif value.is_a?(::Array) value.dup.replace(value.map { |e| convert_value(e) }) else diff --git a/lib/hashie/hash.rb b/lib/hashie/hash.rb index 53af9e4..3a6ad52 100644 --- a/lib/hashie/hash.rb +++ b/lib/hashie/hash.rb @@ -5,7 +5,7 @@ module Hashie # functions baked in such as stringify_keys that may # not be available in all libraries. class Hash < ::Hash - include Hashie::HashExtensions + include HashExtensions # Converts a mash back to a hash (with stringified keys) def to_hash @@ -14,10 +14,10 @@ module Hashie if self[k].is_a?(Array) out[k] ||= [] self[k].each do |array_object| - out[k] << (Hashie::Hash === array_object ? array_object.to_hash : array_object) + out[k] << (Hash === array_object ? array_object.to_hash : array_object) end else - out[k] = Hashie::Hash === self[k] ? self[k].to_hash : self[k] + out[k] = Hash === self[k] ? self[k].to_hash : self[k] end end out diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb index d25865b..3c4e6c7 100644 --- a/lib/hashie/mash.rb +++ b/lib/hashie/mash.rb @@ -54,7 +54,7 @@ module Hashie # mash.author_.name = "Michael Bleigh" (assigned to temp object) # mash.author # => <Mash> # - class Mash < Hashie::Hash + class Mash < Hash include Hashie::PrettyInspect alias_method :to_s, :inspect diff --git a/lib/hashie/trash.rb b/lib/hashie/trash.rb index 39d6e8e..34c381d 100644 --- a/lib/hashie/trash.rb +++ b/lib/hashie/trash.rb @@ -7,7 +7,7 @@ module Hashie # Trashes are useful when you need to read data from another application, # such as a Java api, where the keys are named differently from how we would # in Ruby. - class Trash < Hashie::Dash + class Trash < Dash # Defines a property on the Trash. Options are as follows: # |