lib/twitter/base.rb in twitter-4.6.0 vs lib/twitter/base.rb in twitter-4.6.1

- old
+ new

@@ -92,10 +92,14 @@ # Retrieve the attributes of an object # # @return [Hash] def attrs @attrs.inject({}) do |attrs, (key, value)| - attrs.merge!(key => respond_to?(key) ? send(key) : value) + if value.respond_to?(:attrs) + attrs.merge!(key => value.attrs) + else + attrs.merge!(key => respond_to?(key) ? send(key) : value) + end end end alias to_hash attrs # Update the attributes of an object