X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcore_ext%2Fobject%2Fmetaclass.rb;fp=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcore_ext%2Fobject%2Fmetaclass.rb;h=93fb0ad594c51e943b5758c9f1f2c891219b0e8c;hb=437aa336c44c74a30aeea16a06743c32747ed661;hp=0000000000000000000000000000000000000000;hpb=97a0772b06264134cfe38e7494f9427efe0840a0;p=feedcatcher.git diff --git a/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb b/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb new file mode 100644 index 0000000..93fb0ad --- /dev/null +++ b/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb @@ -0,0 +1,13 @@ +class Object + # Get object's meta (ghost, eigenclass, singleton) class + def metaclass + class << self + self + end + end + + # If class_eval is called on an object, add those methods to its metaclass + def class_eval(*args, &block) + metaclass.class_eval(*args, &block) + end +end