class Tablescript::Library
Attributes
instance[W]
root[R]
Public Class Methods
instance()
click to toggle source
# File lib/tablescript/library.rb, line 36 def self.instance @instance ||= Library.new end
new()
click to toggle source
# File lib/tablescript/library.rb, line 25 def initialize @root = Namespace.new end
Public Instance Methods
table(path)
click to toggle source
# File lib/tablescript/library.rb, line 29 def table(path) parts = path.split('/') return @root.resolve(path) if parts.size == 1 return @root.resolve(parts[1..-1].join('/')) if parts[0].empty? @root.resolve(path) end