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
2025 2026 2027 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2025 def apply(a) " " + text_value.strip + " " + a.value end |
#canonical(a) ⇒ Object
2029 2030 2031 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2029 def canonical(a) " " + a.value end |
#details(a = nil) ⇒ Object
2038 2039 2040 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2038 def details(a = nil) {:infraspecies => {:string => (a.value rescue nil), :rank => text_value.strip}} end |
#pos(a) ⇒ Object
2033 2034 2035 2036 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2033 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
2021 2022 2023 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2021 def value text_value.strip end |