Class: Retab::SheetRegion
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::SheetRegion
- Defined in:
- lib/retab/splits/sheet_region.rb
Constant Summary collapse
- HASH_ATTRS =
{ col_end: :col_end, col_start: :col_start, header_rows: :header_rows, row_end: :row_end, row_start: :row_start, sheet_index: :sheet_index, sheet_name: :sheet_name }.freeze
Instance Attribute Summary collapse
-
#col_end ⇒ Object
Returns the value of attribute col_end.
-
#col_start ⇒ Object
Returns the value of attribute col_start.
-
#header_rows ⇒ Object
Returns the value of attribute header_rows.
-
#row_end ⇒ Object
Returns the value of attribute row_end.
-
#row_start ⇒ Object
Returns the value of attribute row_start.
-
#sheet_index ⇒ Object
Returns the value of attribute sheet_index.
-
#sheet_name ⇒ Object
Returns the value of attribute sheet_name.
Instance Method Summary collapse
-
#initialize(json) ⇒ SheetRegion
constructor
A new instance of SheetRegion.
Constructor Details
#initialize(json) ⇒ SheetRegion
Returns a new instance of SheetRegion.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/retab/splits/sheet_region.rb', line 28 def initialize(json) super() hash = self.class.normalize(json) @col_end = hash[:col_end] @col_start = hash[:col_start] @header_rows = (hash[:header_rows] || []) @row_end = hash[:row_end] @row_start = hash[:row_start] @sheet_index = hash[:sheet_index] @sheet_name = hash[:sheet_name] end |
Instance Attribute Details
#col_end ⇒ Object
Returns the value of attribute col_end.
18 19 20 |
# File 'lib/retab/splits/sheet_region.rb', line 18 def col_end @col_end end |
#col_start ⇒ Object
Returns the value of attribute col_start.
18 19 20 |
# File 'lib/retab/splits/sheet_region.rb', line 18 def col_start @col_start end |
#header_rows ⇒ Object
Returns the value of attribute header_rows.
18 19 20 |
# File 'lib/retab/splits/sheet_region.rb', line 18 def header_rows @header_rows end |
#row_end ⇒ Object
Returns the value of attribute row_end.
18 19 20 |
# File 'lib/retab/splits/sheet_region.rb', line 18 def row_end @row_end end |
#row_start ⇒ Object
Returns the value of attribute row_start.
18 19 20 |
# File 'lib/retab/splits/sheet_region.rb', line 18 def row_start @row_start end |
#sheet_index ⇒ Object
Returns the value of attribute sheet_index.
18 19 20 |
# File 'lib/retab/splits/sheet_region.rb', line 18 def sheet_index @sheet_index end |
#sheet_name ⇒ Object
Returns the value of attribute sheet_name.
18 19 20 |
# File 'lib/retab/splits/sheet_region.rb', line 18 def sheet_name @sheet_name end |