Module: Natour::BotanicalNameUtils
- Defined in:
- lib/natour/utils/botanical_name_utils.rb
Class Method Summary collapse
Class Method Details
.parse(name) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/natour/utils/botanical_name_utils.rb', line 5 def parse(name) result = name.match(/^([^ ]+ [^ ]+)(( aggr\.)|(.*( subsp\. [^ ]+)))?.*$/) return unless result "#{result[1]}#{result[3]}#{result[5]}" end |