lib/lite/ruby/struct.rb in lite-ruby-1.3.3 vs lib/lite/ruby/struct.rb in lite-ruby-2.0.0
- old
+ new
@@ -1,15 +1,13 @@
# frozen_string_literal: false
-if Lite::Ruby.configuration.monkey_patches.include?('struct')
- class Struct
+class Struct
- def attributes
- each_pair.with_object({}) { |(key, val), hash| hash[key] = val }
- end
+ def attributes
+ each_pair.with_object({}) { |(key, val), hash| hash[key] = val }
+ end
- def replace(args)
- args.each_pair { |key, val| self[key] = val }
- end
-
+ def replace(args)
+ args.each_pair { |key, val| self[key] = val }
end
+
end