Public Instance methods
is_exactly(s)
Optimized version of is
that only supports a single string.
[show source]
# File lib/roda/plugins/optimized_string_matchers.rb 35 def is_exactly(s) 36 rp = @remaining_path 37 if _match_string(s) 38 if @remaining_path.empty? 39 always{yield} 40 else 41 @remaining_path = rp 42 end 43 end 44 end
on_branch(s)
Optimized version of on
that only supports a single string.
[show source]
# File lib/roda/plugins/optimized_string_matchers.rb 30 def on_branch(s) 31 always{yield} if _match_string(s) 32 end