Class: ObservationMatrixColumnItem::TaggedDescriptor

Inherits:
ObservationMatrixColumnItem show all
Defined in:
app/models/observation_matrix_column_item/tagged_descriptor.rb

Overview

Adds columns to matrix for descriptors tagged with the provide Keyword (ControlledVocabularyTerm)

Constant Summary

Constants inherited from ObservationMatrixColumnItem

ALL_STI_ATTRIBUTES

Instance Attribute Summary

Attributes inherited from ObservationMatrixColumnItem

#controlled_vocabulary_term_id, #descriptor_id, #observation_matrix_id, #position, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ObservationMatrixColumnItem

batch_create, batch_create_from_pinboard, batch_create_from_tags, #cleanup_matrix_columns, #cleanup_single_matrix_column, create_for, create_for_pinboard_items, create_for_tags, #decrement_matrix_column_reference_count, human_name, #increment_matrix_column_reference_count, #other_subclass_attributes_not_set, #type_is_subclassed, #update_matrix_columns, #update_single_matrix_column

Methods included from Housekeeping

#has_polymorphic_relationship?

Methods inherited from ApplicationRecord

transaction_with_retry

Class Method Details

.subclass_attributesObject



10
11
12
# File 'app/models/observation_matrix_column_item/tagged_descriptor.rb', line 10

def self.subclass_attributes
  [:controlled_vocabulary_term_id]
end

Instance Method Details

#descriptorsObject



14
15
16
# File 'app/models/observation_matrix_column_item/tagged_descriptor.rb', line 14

def descriptors
  Tag.where(keyword: controlled_vocabulary_term, tag_object_type: 'Descriptor').map(&:tag_object)
end

#is_dynamic?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/models/observation_matrix_column_item/tagged_descriptor.rb', line 18

def is_dynamic?
  true
end