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 116 def _consume_segment(convert_meth) 117 rp = @remaining_path 118 if _match_class_String 119 if convert_meth 120 if captures = scope.send(convert_meth, @captures.pop) 121 if captures.is_a?(Array) 122 @captures.concat(captures) 123 else 124 @captures << captures 125 end 126 else 127 @remaining_path = rp 128 nil 129 end 130 else 131 true 132 end 133 end 134 end