Skip to content

Commit

Permalink
Remove tap usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Nov 20, 2012
1 parent b9a19c8 commit f0d882f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/toy/attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def attributes
end

def persisted_attributes
{}.tap do |attrs|
self.class.persisted_attributes.each do |attribute|
if (value = attribute.to_store(read_attribute(attribute.name)))
attrs[attribute.persisted_name] = value
end
attributes = {}
self.class.persisted_attributes.each do |attribute|
if (value = attribute.to_store(read_attribute(attribute.name)))
attributes[attribute.persisted_name] = value
end
end
attributes
end

def attributes=(attrs, *)
Expand Down

0 comments on commit f0d882f

Please sign in to comment.