Class: MOCO::Tagging

Inherits:
BaseEntity show all
Defined in:
lib/moco/entities/tagging.rb

Overview

Represents a MOCO tagging (association between a tag and an entity) This is a read-only entity representing tag assignments.

Read-only attributes:

id, entity_id, entity_type, tag (Hash), created_at, updated_at

Note:

To apply tags to entities, use the `tags` attribute when
creating/updating the entity directly:
moco.projects.update(123, tags: ["Priority", "Important"])

See also: Tag entity for managing available tags.

Instance Attribute Summary

Attributes inherited from BaseEntity

#attributes, #client

Instance Method Summary collapse

Methods inherited from BaseEntity

#==, #association, #destroy, #eql?, #has_many, #hash, #id, #initialize, #inspect, #reload, #save, #to_h, #to_json, #update

Constructor Details

This class inherits a constructor from MOCO::BaseEntity

Instance Method Details

#tagObject

Associations



19
20
21
# File 'lib/moco/entities/tagging.rb', line 19

def tag
  association(:tag)
end

#to_sObject



23
24
25
# File 'lib/moco/entities/tagging.rb', line 23

def to_s
  "Tagging ##{id}"
end