lib/search_party.rb in laserlemon-search_party-0.2.1 vs lib/search_party.rb in laserlemon-search_party-0.2.2
- old
+ new
@@ -25,12 +25,11 @@
end
private
def parse_search_parameter(value)
- if p = self.class.search_parameter_patterns.detect{|r,v| match = r.match(value) }
- v = p.last
- v.respond_to?(:call) ? v.call(value, $~) : v
+ if p = self.class.search_parameter_patterns.detect{|r,v| r.match(value) }
+ (v = p.last).respond_to?(:call) ? v.call($~) : v
else
value
end
end
end