Public Instance methods
_consume_segment(convert_meth)
Use faster approach for segment matching. This is used for matchers based on the String class matcher, and avoids the use of regular expressions for scanning.
[show source]
# File lib/roda/plugins/class_matchers.rb 133 def _consume_segment(convert_meth) 134 rp = @remaining_path 135 if _match_class_String 136 if convert_meth 137 if captures = scope.send(convert_meth, @captures.pop) 138 if captures.is_a?(Array) 139 @captures.concat(captures) 140 else 141 @captures << captures 142 end 143 else 144 @remaining_path = rp 145 nil 146 end 147 else 148 true 149 end 150 end 151 end