Class: Extract::Tables
- Includes:
- FromHash
- Defined in:
- lib/extract/tables.rb
Instance Attribute Summary collapse
-
#sheet_def ⇒ Object
Returns the value of attribute sheet_def.
Instance Method Summary collapse
- #[](c) ⇒ Object
- #add(name, range) ⇒ Object
- #each(&b) ⇒ Object
- #for_cell(c) ⇒ Object
- #values ⇒ Object
Instance Attribute Details
#sheet_def ⇒ Object
Returns the value of attribute sheet_def.
4 5 6 |
# File 'lib/extract/tables.rb', line 4 def sheet_def @sheet_def end |
Instance Method Details
#[](c) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/extract/tables.rb', line 25 def [](c) if c.to_s == 'all' Table.new(:cell_range => "A1:D100", :name => "all", :sheet_def => sheet_def) else tables[c] end end |
#add(name, range) ⇒ Object
7 8 9 |
# File 'lib/extract/tables.rb', line 7 def add(name,range) self.tables[name] = Table.new(:cell_range => range, :name => name, :sheet_def => sheet_def) end |
#each(&b) ⇒ Object
32 33 34 |
# File 'lib/extract/tables.rb', line 32 def each(&b) tables.each(&b) end |
#for_cell(c) ⇒ Object
21 22 23 |
# File 'lib/extract/tables.rb', line 21 def for_cell(c) cell_map[c] end |
#values ⇒ Object
35 36 37 |
# File 'lib/extract/tables.rb', line 35 def values tables.values end |