Module: Insightly::TagHelper

Included in:
Contact, Opportunity, Organisation
Defined in:
lib/insightly/tag_helper.rb

Instance Method Summary collapse

Instance Method Details

#add_tag(tag) ⇒ Object



10
11
12
13
14
# File 'lib/insightly/tag_helper.rb', line 10

def add_tag(tag)
  @data["TAGS"]  ||= []
  @data["TAGS"] << tag.remote_data
  true
end

#tagsObject



3
4
5
6
# File 'lib/insightly/tag_helper.rb', line 3

def tags
    @data["TAGS"]  ||= []
    @data["TAGS"].collect {|a| Insightly::Tag.build(a)}
end

#tags=(list) ⇒ Object



7
8
9
# File 'lib/insightly/tag_helper.rb', line 7

def tags=(list)
  @data["TAGS"] = list ? list.collect {|a| a.remote_data} : []
end