Module: FruitToLime::ModelHasTags

Included in:
Deal, Organization, Person
Defined in:
lib/fruit_to_lime/model_helpers.rb

Instance Method Summary collapse

Instance Method Details

#set_tag(str) ⇒ Object

Examples:

obj.set_tag("partner")


47
48
49
50
51
52
# File 'lib/fruit_to_lime/model_helpers.rb', line 47

def set_tag(str)
    @tags = [] if @tags == nil
    if ! @tags.any? {|tag| tag.value == str }
        @tags.push(Tag.new(str))
    end
end