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 39 def is_exactly(s) 40 rp = @remaining_path 41 if _match_string(s) 42 if @remaining_path.empty? 43 always{yield} 44 end 45 @remaining_path = rp 46 end 47 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 rp = @remaining_path 32 if _match_string(s) 33 always{yield} 34 @remaining_path = rp 35 end 36 end