aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object_and_class.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object_and_class.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/object_and_class.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/object_and_class.rb b/activesupport/lib/active_support/core_ext/object_and_class.rb
index 7864c1a9dc..aef1f22c6f 100644
--- a/activesupport/lib/active_support/core_ext/object_and_class.rb
+++ b/activesupport/lib/active_support/core_ext/object_and_class.rb
@@ -50,6 +50,10 @@ class Object #:nodoc:
raise unless exception_classes.any? {|cls| e.kind_of? cls}
end
end
+
+ def with_options(options)
+ yield ActiveSupport::OptionMerger.new(self, options)
+ end
end
class Class #:nodoc: