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)


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

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

#available_annotation_typesObject



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

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