Class: Riptables::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/riptables/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Table



11
12
13
14
# File 'lib/riptables/table.rb', line 11

def initialize(name)
  @name = name
  @chains = {}
end

Instance Attribute Details

#chainsObject (readonly)

Returns the value of attribute chains.



9
10
11
# File 'lib/riptables/table.rb', line 9

def chains
  @chains
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/riptables/table.rb', line 8

def name
  @name
end

Instance Method Details

#chain(name) ⇒ Object



20
21
22
# File 'lib/riptables/table.rb', line 20

def chain(name)
  @chains[name] ||= Chain.new(self, name)
end

#dslObject



16
17
18
# File 'lib/riptables/table.rb', line 16

def dsl
  @dsl ||= DSL::Table.new(self)
end

#export(options = {}) ⇒ Object



24
25
26
# File 'lib/riptables/table.rb', line 24

def export(options = {})
  TableExport.new(self, options)
end