Guest User

Untitled

a guest
Mar 5th, 2018
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. >> x = EmailAddress.find(1)
  2. => #<EmailAddress:0x3721ac0 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>
  3. >> y = EmailAddress.find(1)
  4. => #<EmailAddress:0x371e258 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>
  5. >> x == y
  6. => true
  7. >> a = [x, y]
  8. => [#<EmailAddress:0x3721ac0 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>, #<EmailAddress:0x371e258 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>]
  9. >> [x, y] == a
  10. => true
  11. >> a.uniq
  12. => [#<EmailAddress:0x3721ac0 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>, #<EmailAddress:0x371e258 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>]
Add Comment
Please, Sign In to add comment