Class: Ptolemy::TOML::KeyGroup

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/ptolemy/nodes.rb

Overview

Represents an element of the form [x.y.z.w]

Instance Method Summary collapse

Instance Method Details

#to_valueArray

Evaluate an array of keys split by the ‘.’

Returns:

  • (Array)

    the array of nested keys represented by the key group



65
66
67
68
69
70
71
# File 'lib/ptolemy/nodes.rb', line 65

def to_value
  result = [keys.key.to_value]
  keys.remaining_keys.elements.each do |elem|
    result << elem.key.to_value
  end
  result
end