lib/core/facets/struct/attributes.rb in facets-2.8.2 vs lib/core/facets/struct/attributes.rb in facets-2.8.3
- old
+ new
@@ -1,11 +1,15 @@
class Struct
- # Returns a hash containing the names and values for all instance variables in the Struct.
+ # Returns a hash containing the names and values
+ # for all instance settings in the Struct.
+ #
+ # This will eventually be deprecated in favor of #to_h.
+
def attributes
h = {}
each_pair { |k,v| h[k] = v }
h
end
-end # class Struct
+end