Skip to content

Instantly share code, notes, and snippets.

View blackanger's full-sized avatar

Alex blackanger

  • www.nibirutech.com
View GitHub Profile
[:name,:quantity,:price,:percent_deposit,:amount_deposit,:weight ].select{ |attr| original.send(attr) != current.send(attr) }
比较original 和 current两个对象 attr的变化
class Test
def hello
p "hello world"
end
end