mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Indentation >>
This commit is contained in:
parent
ef1dbd8cc7
commit
a2a515d9de
1 changed files with 6 additions and 6 deletions
|
@ -205,18 +205,18 @@ class Module
|
|||
if allow_nil
|
||||
method_def = [
|
||||
"def #{method_prefix}#{method}(#{definition})",
|
||||
"_ = #{to}",
|
||||
"if !_.nil? || nil.respond_to?(:#{method})",
|
||||
" _.#{method}(#{definition})",
|
||||
"end",
|
||||
"end"
|
||||
" _ = #{to}",
|
||||
" if !_.nil? || nil.respond_to?(:#{method})",
|
||||
" _.#{method}(#{definition})",
|
||||
" end",
|
||||
"end"
|
||||
].join ";"
|
||||
else
|
||||
exception = %(raise DelegationError, "#{self}##{method_prefix}#{method} delegated to #{to}.#{method}, but #{to} is nil: \#{self.inspect}")
|
||||
|
||||
method_def = [
|
||||
"def #{method_prefix}#{method}(#{definition})",
|
||||
" _ = #{to}",
|
||||
" _ = #{to}",
|
||||
" _.#{method}(#{definition})",
|
||||
"rescue NoMethodError => e",
|
||||
" if _.nil? && e.name == :#{method}",
|
||||
|
|
Loading…
Reference in a new issue