Method: Hollybush::List#<<

Defined in:
lib/hollybush/list.rb

#<<(entry) ⇒ Object



42
43
44
45
46
# File 'lib/hollybush/list.rb', line 42

def <<(entry)
  save unless persisted?
  BSON::ObjectId.create_pk(entry)
  @entries << entry if List.coll.update({"_id" => make_id(@id)}, {"$push" => {:entries => entry}})
end