Class: Identifiers::RepecId

Inherits:
Object
  • Object
show all
Defined in:
lib/identifiers/repec_id.rb

Class Method Summary collapse

Class Method Details

.extract(str) ⇒ Object



3
4
5
# File 'lib/identifiers/repec_id.rb', line 3

def self.extract(str)
  str.scan(/\brepec:\S+\b/i).map { |repec| "RePEc:#{repec.split(':', 2).last}" }
end