class YamlTranslator::KeyPath

Attributes

keys[R]

Public Class Methods

new() click to toggle source
# File lib/yaml-translator/key_path.rb, line 5
def initialize
  @keys = []
end

Public Instance Methods

current() click to toggle source
# File lib/yaml-translator/key_path.rb, line 17
def current
  @keys.join('.')
end
leave() click to toggle source
# File lib/yaml-translator/key_path.rb, line 13
def leave
  @keys.pop
end
move_to(key) click to toggle source
# File lib/yaml-translator/key_path.rb, line 9
def move_to(key)
  @keys.push(key)
end
to_s() click to toggle source
# File lib/yaml-translator/key_path.rb, line 21
def to_s
  current
end