Method: Note::Base#from_annotation_list!
- Defined in:
- app/models/note/base.rb
#from_annotation_list!(str) ⇒ Object
TODO: This should move to umt because the “list” is more or less proprietary
108 109 110 111 112 113 114 115 |
# File 'app/models/note/base.rb', line 108 def from_annotation_list!(str) str.gsub(/\[|\]/, '').split('; ').map { |a| a.split(' ') }.each do |annotation| namespace, predicate = annotation.first.split(':', 2) annotations << Note::Annotated::Base.new(value: annotation.second, namespace: namespace, predicate: predicate) end self end |