Module: ScientificNameClean::Rank0
- Defined in:
- lib/biodiversity/parser/scientific_name_clean.rb
Instance Method Summary collapse
- #apply(a) ⇒ Object
- #canonical(a) ⇒ Object
- #details(a = nil) ⇒ Object
- #pos(a) ⇒ Object
- #value ⇒ Object
Instance Method Details
#apply(a) ⇒ Object
2059 2060 2061 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2059 def apply(a) " " + text_value.strip + " " + a.value end |
#canonical(a) ⇒ Object
2063 2064 2065 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2063 def canonical(a) " " + a.value end |
#details(a = nil) ⇒ Object
2072 2073 2074 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2072 def details(a = nil) {:infraspecies => {:string => (a.value rescue nil), :rank => text_value.strip}} end |
#pos(a) ⇒ Object
2067 2068 2069 2070 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2067 def pos(a) interval_end = text_value[-1] == ' ' ? interval.end - 1 : interval.end {interval.begin => ['infraspecific_type', interval_end], a.interval.begin => ['infraspecies', a.interval.end]} end |
#value ⇒ Object
2055 2056 2057 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2055 def value text_value.strip end |