class Tablescript::NamespaceGenerator
Public Class Methods
new(scope)
click to toggle source
# File lib/tablescript/namespace_generator.rb, line 6 def initialize(scope) @scope = scope end
Public Instance Methods
namespace(name, &blk)
click to toggle source
# File lib/tablescript/namespace_generator.rb, line 10 def namespace(name, &blk) generator = NamespaceGenerator.new(@scope.namespace(name.to_s)) generator.instance_eval(&blk) end
table(name, &blk)
click to toggle source
# File lib/tablescript/namespace_generator.rb, line 15 def table(name, &blk) table = Table.new(name.to_s, @scope, &blk) @scope.add(table) end