Merge pull request #5729 from oscardelben/use_tap
Use the more idiomatic tap method
This commit is contained in:
commit
7d67880a2d
@ -255,11 +255,7 @@ def undefine_attribute_methods
|
||||
|
||||
# Returns true if the attribute methods defined have been generated.
|
||||
def generated_attribute_methods #:nodoc:
|
||||
@generated_attribute_methods ||= begin
|
||||
mod = Module.new
|
||||
include mod
|
||||
mod
|
||||
end
|
||||
@generated_attribute_methods ||= Module.new.tap { |mod| include mod }
|
||||
end
|
||||
|
||||
protected
|
||||
|
Loading…
Reference in New Issue
Block a user