Class: Iqvoc::Origin::Filters::LeadingNumberHandler

Inherits:
GenericFilter
  • Object
show all
Defined in:
lib/iqvoc/origin.rb

Instance Method Summary collapse

Methods inherited from GenericFilter

#run

Instance Method Details

#call(obj, str) ⇒ Object



87
88
89
90
91
92
93
# File 'lib/iqvoc/origin.rb', line 87

def call(obj, str)
  str = str.gsub(/^[0-9].*$/) do |match|
    "_#{match}"
  end

  run(obj, str)
end