class GCEMetadata::Revision
Public Class Methods
new(path)
click to toggle source
# File lib/gce_metadata/revision.rb, line 5 def initialize(path) @path = path @default_child_key = 'v1/' end
Public Instance Methods
is_struct?(child_key)
click to toggle source
# File lib/gce_metadata/revision.rb, line 18 def is_struct?(child_key) child_key =~ /\/$/ end
new_child(child_key)
click to toggle source
# File lib/gce_metadata/revision.rb, line 10 def new_child(child_key) logging("new_child(#{child_key.inspect})") do child_path = "#{path}#{child_key}" child_path << '/' if (is_struct?(child_key) and not child_key.match(%r'/$')) Base.new(child_path) end end