aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module/delegation.rb
diff options
context:
space:
mode:
authorTomasz Zurkowski <doriath88@gmail.com>2012-01-20 10:01:22 +0100
committerTomasz Zurkowski <doriath88@gmail.com>2012-01-20 10:01:22 +0100
commit665322eaab7246a961ff6a90cdceaf63c277d8d1 (patch)
tree1ac0a17d4d3bf532e81735d7c01a9a12b63b3c92 /activesupport/lib/active_support/core_ext/module/delegation.rb
parent2c7ded31fb89c924bcb3a1b5f57d5c0f5b675ef1 (diff)
downloadrails-665322eaab7246a961ff6a90cdceaf63c277d8d1.tar.gz
rails-665322eaab7246a961ff6a90cdceaf63c277d8d1.tar.bz2
rails-665322eaab7246a961ff6a90cdceaf63c277d8d1.zip
Fix indentation in code example of Delegation
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module/delegation.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/module/delegation.rb38
1 files changed, 19 insertions, 19 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb
index 7de824a77f..ac2a63d3a1 100644
--- a/activesupport/lib/active_support/core_ext/module/delegation.rb
+++ b/activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -81,25 +81,25 @@ class Module
# no matter whether +nil+ responds to the delegated method. You can get a
# +nil+ instead with the +:allow_nil+ option.
#
- # class Foo
- # attr_accessor :bar
- # def initialize(bar = nil)
- # @bar = bar
- # end
- # delegate :zoo, :to => :bar
- # end
- #
- # Foo.new.zoo # raises NoMethodError exception (you called nil.zoo)
- #
- # class Foo
- # attr_accessor :bar
- # def initialize(bar = nil)
- # @bar = bar
- # end
- # delegate :zoo, :to => :bar, :allow_nil => true
- # end
- #
- # Foo.new.zoo # returns nil
+ # class Foo
+ # attr_accessor :bar
+ # def initialize(bar = nil)
+ # @bar = bar
+ # end
+ # delegate :zoo, :to => :bar
+ # end
+ #
+ # Foo.new.zoo # raises NoMethodError exception (you called nil.zoo)
+ #
+ # class Foo
+ # attr_accessor :bar
+ # def initialize(bar = nil)
+ # @bar = bar
+ # end
+ # delegate :zoo, :to => :bar, :allow_nil => true
+ # end
+ #
+ # Foo.new.zoo # returns nil
#
def delegate(*methods)
options = methods.pop