gapic-generator/lib/gapic/model/method/routing.rb
def to_field_pattern pattern
            tail_slash_accept = if pattern.segments.last.simplified_pattern == "**"
                                  ""
                                else
                                  "/?"
                                end
            "^#{pattern.to_regex_str}#{tail_slash_accept}$"
          end
# Makes a regex pattern match a field
# - adds markers for the beginning and end of the string
# - adds handling of an optional tail `/` if needed
# @param pattern [String]
# @return [String]
Makes a regex pattern match a field
adds markers for the beginning and end of the string
adds handling of an optional tail `/` if needed
Makes a regex pattern match a field adds markers for the beginning and end of the string adds handling of an optional tail ` / ` if needed
def to_field_pattern pattern
            tail_slash_accept = if pattern.segments.last.simplified_pattern == "**"
                                  ""
                                else
                                  "/?"
                                end
            "^#{pattern.to_regex_str}#{tail_slash_accept}$"
          end
def to_field_pattern pattern tail_slash_accept = if pattern . segments . last . simplified_pattern == "**" "" else "/?" end "^#{pattern.to_regex_str}#{tail_slash_accept}$" end
Makes a regex pattern match a field
 adds markers for the beginning and end of the string
 adds handling of an optional tail `/` if needed
Makes a regex pattern match a field adds markers for the beginning and end of the string adds handling of an optional tail ` / ` if needed
None
String
pattern
None