Module: ScientificNameClean::AnnotationIdentification1

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

Instance Method Summary collapse

Instance Method Details

#apply(sp) ⇒ Object



7312
7313
7314
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7312

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

#canonical(sp) ⇒ Object



7316
7317
7318
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7316

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

#details(sp) ⇒ Object



7325
7326
7327
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7325

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

#pos(sp) ⇒ Object



7320
7321
7322
7323
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7320

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

#valueObject



7308
7309
7310
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7308

def value
  text_value.strip
end