Class: Riptables::DSL::Base

Inherits:
Global
  • Object
show all
Defined in:
lib/riptables/dsl/base.rb

Instance Method Summary collapse

Methods inherited from Global

#role, #zone

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