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 131 def _consume_segment(convert_meth) 132 rp = @remaining_path 133 if _match_class_String 134 if convert_meth 135 if captures = scope.send(convert_meth, @captures.pop) 136 if captures.is_a?(Array) 137 @captures.concat(captures) 138 else 139 @captures << captures 140 end 141 else 142 @remaining_path = rp 143 nil 144 end 145 else 146 true 147 end 148 end 149 end