Module: MongoTagger::InstanceMethods

Defined in:
lib/mongo_tagger.rb

Instance Method Summary collapse

Instance Method Details

#tag_listObject



24
25
26
# File 'lib/mongo_tagger.rb', line 24

def tag_list
  tags.collect(&:name).join(", ")
end

#tag_list=(list_of_tags = "") ⇒ Object



18
19
20
21
22
# File 'lib/mongo_tagger.rb', line 18

def tag_list=(list_of_tags="")
  list_of_tags.split(",").each do |tag|
    tags << Tag.new(:name => tag.strip)
  end
end