Class: Tablescript::NamespaceGenerator
- Inherits:
-
Object
- Object
- Tablescript::NamespaceGenerator
- Defined in:
- lib/tablescript/namespace_generator.rb
Overview
NamespaceGenerator
Instance Method Summary collapse
-
#initialize(scope) ⇒ NamespaceGenerator
constructor
A new instance of NamespaceGenerator.
- #namespace(name, &blk) ⇒ Object
- #table(name, &blk) ⇒ Object
Constructor Details
#initialize(scope) ⇒ NamespaceGenerator
Returns a new instance of NamespaceGenerator.
6 7 8 |
# File 'lib/tablescript/namespace_generator.rb', line 6 def initialize(scope) @scope = scope end |
Instance Method Details
#namespace(name, &blk) ⇒ Object
10 11 12 13 |
# 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 |