diff options
author | Xavier Noria <fxn@hashref.com> | 2012-01-20 01:17:13 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-01-20 01:17:13 -0800 |
commit | 616c5aef23ba6fe3aabf41454e07fc86ca589d4a (patch) | |
tree | 1ac0a17d4d3bf532e81735d7c01a9a12b63b3c92 /activesupport | |
parent | 2c7ded31fb89c924bcb3a1b5f57d5c0f5b675ef1 (diff) | |
parent | 665322eaab7246a961ff6a90cdceaf63c277d8d1 (diff) | |
download | rails-616c5aef23ba6fe3aabf41454e07fc86ca589d4a.tar.gz rails-616c5aef23ba6fe3aabf41454e07fc86ca589d4a.tar.bz2 rails-616c5aef23ba6fe3aabf41454e07fc86ca589d4a.zip |
Merge pull request #79 from doriath/master
Fix indentation in comment of Delegation module
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/delegation.rb | 38 |
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 |