So what is your definition of == ? are attribute names completely
irrelevant or is there a mapping of some sort. If you really are just
interested in the values of the fields blah.attributes.values will
give you that (you probably want to omit the id attribute from that).
{"location"=>nil, "created_at"=>Tue Aug 30 12:01:25 UTC 2011,
"updated_at"=>Tue Aug 30 12:01:25 UTC
2011, "contact"=>nil, "id"=>1, "os_name"=>"", "os_version"=>"",
"device_ip"=>"172.16.1.100, fe80::78
05:44c6:9da9:9d01", "basemanged_internal_id"=>17,
"device_name"=>"rocscom.roc.com", "basemanged_enti
ty_id"=>"37532278-43C5-411F-593E-96B1A74C6B18"}
I want to compare these two objects for specific fields like
ipaddress, device_name like that.
well it does look like you'd have to explicitly write out the
comparison you want to make, e.g.
first.device_ip == other.IPAddress && first. basemanged_entity_id ==
other.BaseManagedEntityId