Class: Riptables::Table
- Inherits:
-
Object
- Object
- Riptables::Table
- Defined in:
- lib/riptables/table.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#chains ⇒ Object
readonly
Returns the value of attribute chains.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #chain(name) ⇒ Object
- #dsl ⇒ Object
- #export(options = {}) ⇒ Object
-
#initialize(base, name) ⇒ Table
constructor
A new instance of Table.
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
#base ⇒ Object (readonly)
Returns the value of attribute base.
8 9 10 |
# File 'lib/riptables/table.rb', line 8 def base @base end |
#chains ⇒ Object (readonly)
Returns the value of attribute chains.
10 11 12 |
# File 'lib/riptables/table.rb', line 10 def chains @chains end |
#name ⇒ Object (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 |
#dsl ⇒ Object
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( = {}) TableExport.new(self, ) end |