Class: CloudFormation::DynamoDB

Inherits:
Base
  • Object
show all
Defined in:
lib/cloud_formation/dynamo_db.rb

Defined Under Namespace

Classes: Table

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

attribute_list, #build

Constructor Details

#initializeDynamoDB

Returns a new instance of DynamoDB.



6
7
8
# File 'lib/cloud_formation/dynamo_db.rb', line 6

def initialize
  @tables = []
end

Instance Attribute Details

#tablesObject

Returns the value of attribute tables.



4
5
6
# File 'lib/cloud_formation/dynamo_db.rb', line 4

def tables
  @tables
end

Instance Method Details

#build_table {|table| ... } ⇒ Object

Yields:

  • (table)


10
11
12
13
14
15
# File 'lib/cloud_formation/dynamo_db.rb', line 10

def build_table &block
  table = Table.new
  yield table
  @tables << table
  table
end