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(base, name) ⇒ Table

Returns a new instance of Table.



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

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

Instance Attribute Details

#baseObject (readonly)

Returns the value of attribute base.



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

def base
  @base
end

#chainsObject (readonly)

Returns the value of attribute chains.



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

def chains
  @chains
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#chain(name) ⇒ Object



22
23
24
# File 'lib/riptables/table.rb', line 22

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

#dslObject



18
19
20
# File 'lib/riptables/table.rb', line 18

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

#export(options = {}) ⇒ Object



26
27
28
# File 'lib/riptables/table.rb', line 26

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