gapic-generator/lib/gapic/path_pattern/pattern.rb
def parent_template
        return nil if segments.length <= 2
        last_segment = segments.last
        parent_pattern_segments = last_segment.provides_arguments? ? segments[0...-2] : segments[0...-1]
        parent_pattern_segments.map(&:pattern_template).join("/")
      end
##
# A parent template to this pattern or an empty string if a pattern
# can not have a parent (too short)
# @return [String]
A parent template to this pattern or an empty string if a pattern
can not have a parent (too short)
A parent template to this pattern or an empty string if a pattern can not have a parent ( too short )
def parent_template
        return nil if segments.length <= 2
        last_segment = segments.last
        parent_pattern_segments = last_segment.provides_arguments? ? segments[0...-2] : segments[0...-1]
        parent_pattern_segments.map(&:pattern_template).join("/")
      end
def parent_template return nil if segments . length <= 2 last_segment = segments . last parent_pattern_segments = last_segment . provides_arguments? ? segments [ 0 ... - 2 ] : segments [ 0 ... - 1 ] parent_pattern_segments . map ( & :pattern_template ) . join ( "/" ) end
A parent template to this pattern or an empty string if a pattern
can not have a parent (too short)
A parent template to this pattern or an empty string if a pattern can not have a parent ( too short )
None
String