Module: ScientificNameClean::AnnotationIdentification1

Defined in:
lib/biodiversity/parser/scientific_name_clean.rb

Instance Method Summary collapse

Instance Method Details

#apply(sp) ⇒ Object



6914
6915
6916
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 6914

def apply(sp)
  " " + value + " " + sp.value
end

#canonical(sp) ⇒ Object



6918
6919
6920
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 6918

def canonical(sp)
  " " + sp.canonical
end

#details(sp) ⇒ Object



6927
6928
6929
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 6927

def details(sp)
  {:annotation_identification => value, :species => sp.details}
end

#pos(sp) ⇒ Object



6922
6923
6924
6925
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 6922

def pos(sp)
  interval_end = text_value[-1] == " " ? interval.end - 1 : interval.end
  {interval.begin => ["annotation_identification", interval.end]}.merge(sp.pos)
end

#valueObject



6910
6911
6912
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 6910

def value
  text_value.strip
end