lib/roda/plugins/header_matchers.rb
# Match the submitted user agent to the given pattern, capturing any
# regexp match groups.
Match the submitted user agent to the given pattern, capturing any
regexp match groups.
Match the submitted user agent to the given pattern capturing any regexp match groups .
def match_user_agent(pattern)
          if (user_agent = @env["HTTP_USER_AGENT"]) && user_agent.to_s =~ pattern
            @captures.concat($~[1..-1])
          end
        end
def match_user_agent ( pattern ) if ( user_agent = @env [ "HTTP_USER_AGENT" ] ) && user_agent . to_s =~ pattern @captures . concat ( $~ [ 1 .. - 1 ] ) end end
Match the submitted user agent to the given pattern, capturing any
regexp match groups.
Match the submitted user agent to the given pattern capturing any regexp match groups .
pattern