module AWS::Record::FinderMethods

def [] id

Returns:
  • (Record::Base) - Returns the record, as a sub-class of

Raises:
  • (RecordNotFound) - Raises a record not found exception if there

Parameters:
  • id (String) -- The id of the record to load.
def [] id
  data = sdb_domain.items[id].data.attributes
  raise RecordNotFound, "no data found for id: #{id}" if data.empty?
  obj = self.new
  obj.send(:hydrate, id, data)
  obj
end