Sha256: c11769e3be1decbc2549e52dd76362ee7fbf68e890f306d98744b4eebf00e2ac

Contents?: true

Size: 1.07 KB

Versions: 18

Compression:

Stored size: 1.07 KB

Contents

# frozen_string_literal: true

# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require "gapic/path_template/parser"

module Gapic
  # TODO: Enter docs
  # Dooooooooocs!!!
  module PathTemplate
    # Parse a URI path template.
    #
    # @see https://tools.ietf.org/html/rfc6570 URI Template
    #
    # @param path_template [String] The URI path template to be parsed.
    #
    # @return [Array<PathTemplate::Segment|String>] The segments of the URI
    #   path template.
    def self.parse path_template
      Parser.new(path_template).segments
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
gapic-generator-0.6.0 lib/gapic/path_template.rb
gapic-generator-0.5.1 lib/gapic/path_template.rb
gapic-generator-0.5.0 lib/gapic/path_template.rb
gapic-generator-0.4.2 lib/gapic/path_template.rb
gapic-generator-0.4.0 lib/gapic/path_template.rb
gapic-generator-0.3.3 lib/gapic/path_template.rb
gapic-generator-0.3.1 lib/gapic/path_template.rb
gapic-generator-0.3.0 lib/gapic/path_template.rb
gapic-generator-0.2.3 lib/gapic/path_template.rb
gapic-generator-0.2.2 lib/gapic/path_template.rb
gapic-generator-0.2.0 lib/gapic/path_template.rb
gapic-generator-0.1.7 lib/gapic/path_template.rb
gapic-generator-0.1.5 lib/gapic/path_template.rb
gapic-generator-0.1.4 lib/gapic/path_template.rb
gapic-generator-0.1.3 lib/gapic/path_template.rb
gapic-generator-0.1.2 lib/gapic/path_template.rb
gapic-generator-0.1.1 lib/gapic/path_template.rb
gapic-generator-0.1.0 lib/gapic/path_template.rb