Module: IsTaggable::TaggableMethods::InstanceMethods

Defined in:
lib/is_taggable.rb

Instance Method Summary collapse

Instance Method Details

#get_tag_list(kind) ⇒ Object


53
54
55
56
# File 'lib/is_taggable.rb', line 53

def get_tag_list(kind)
  set_tag_list(kind, tags.of_kind(kind).map(&:name)) if tag_list_instance_variable(kind).nil?
  tag_list_instance_variable(kind)
end

#set_tag_list(kind, list) ⇒ Object


48
49
50
51
# File 'lib/is_taggable.rb', line 48

def set_tag_list(kind, list)
  tag_list = TagList.new(list)
  instance_variable_set(tag_list_name_for_kind(kind), tag_list)
end