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
2068 2069 2070 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2068 def apply(a) " " + text_value.strip + " " + a.value end |
#canonical(a) ⇒ Object
2072 2073 2074 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2072 def canonical(a) " " + a.value end |
#details(a = nil) ⇒ Object
2081 2082 2083 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2081 def details(a = nil) {:infraspecies => {:string => (a.value rescue nil), :rank => text_value.strip}} end |
#pos(a) ⇒ Object
2076 2077 2078 2079 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2076 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
2064 2065 2066 |
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 2064 def value text_value.strip end |