Class: Iqvoc::Origin::Filters::UriConformanceFilter
- Inherits:
-
GenericFilter
- Object
- GenericFilter
- Iqvoc::Origin::Filters::UriConformanceFilter
- Defined in:
- lib/iqvoc/origin.rb
Instance Method Summary collapse
Methods inherited from GenericFilter
Instance Method Details
#call(obj, str) ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'lib/iqvoc/origin.rb', line 53 def call(obj, str) str = str.parameterize # basic url conformance # prefix with '_' if origin starts with digit str = str.gsub(/^[0-9].*$/) do |match| "_#{match}" end run(obj, str) end |