Module: Extract::Tree::Cell
- Defined in:
- lib/extract/tree/cell.rb
Instance Method Summary collapse
- #col ⇒ Object
- #deps ⇒ Object
- #excel_value ⇒ Object
- #leading_neg? ⇒ Boolean
- #proper_cell ⇒ Object
- #row ⇒ Object
- #tt ⇒ Object
Instance Method Details
#col ⇒ Object
22 23 24 |
# File 'lib/extract/tree/cell.rb', line 22 def col c.text_value end |
#deps ⇒ Object
25 26 27 |
# File 'lib/extract/tree/cell.rb', line 25 def deps [proper_cell] end |
#excel_value ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/extract/tree/cell.rb', line 10 def excel_value res = find_sheet[proper_cell] #raise proper_cell if text_value == "-A2" if res.present? leading_neg? ? res * -1 : res else res end end |
#leading_neg? ⇒ Boolean
7 8 9 |
# File 'lib/extract/tree/cell.rb', line 7 def leading_neg? text_value[0..0] == '-' end |
#proper_cell ⇒ Object
4 5 6 |
# File 'lib/extract/tree/cell.rb', line 4 def proper_cell text_value.gsub("-","").gsub("$","") end |
#row ⇒ Object
19 20 21 |
# File 'lib/extract/tree/cell.rb', line 19 def row r.text_value.to_i end |
#tt ⇒ Object
28 29 30 |
# File 'lib/extract/tree/cell.rb', line 28 def tt :cell end |