Module: Shared::IsData::Annotation::ClassMethods

Defined in:
app/models/concerns/shared/is_data/annotation.rb

Instance Method Summary collapse

Instance Method Details

#annotates?Boolean

Returns:

  • (Boolean)


70
71
72
# File 'app/models/concerns/shared/is_data/annotation.rb', line 70

def annotates?
  self < Shared::PolymorphicAnnotator ? true : false
end

#available_annotation_typesObject



83
84
85
86
87
# File 'app/models/concerns/shared/is_data/annotation.rb', line 83

def available_annotation_types
  ::ANNOTATION_TYPES.collect do |a|
    self.send("has_#{a}?") ? a.to_s.classify : nil
  end.compact
end