Class: Tablescript::Library
- Inherits:
-
Object
- Object
- Tablescript::Library
- Defined in:
- lib/tablescript/library.rb
Overview
Library
Class Attribute Summary collapse
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
-
#initialize ⇒ Library
constructor
A new instance of Library.
- #table(path) ⇒ Object
Constructor Details
Class Attribute Details
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
23 24 25 |
# File 'lib/tablescript/library.rb', line 23 def root @root end |
Instance Method Details
#table(path) ⇒ Object
29 30 31 32 33 34 |
# 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 |