Class: Riptables::DSL::Base
Instance Method Summary collapse
-
#initialize(base, &block) ⇒ Base
constructor
A new instance of Base.
- #table(name, &block) ⇒ Object
Methods inherited from Global
Constructor Details
#initialize(base, &block) ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/riptables/dsl/base.rb', line 8 def initialize(base, &block) @base = base end |
Instance Method Details
#table(name, &block) ⇒ Object
12 13 14 15 16 |
# File 'lib/riptables/dsl/base.rb', line 12 def table(name, &block) table = Riptables::Table.new(@base, name) table.dsl.instance_eval(&block) @base.tables << table end |