Class: Retab::ReconstructResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ReconstructResponse
- Defined in:
- lib/retab/splits/reconstruct_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ tables: :tables }.freeze
Instance Attribute Summary collapse
-
#tables ⇒ Object
Returns the value of attribute tables.
Instance Method Summary collapse
-
#initialize(json) ⇒ ReconstructResponse
constructor
A new instance of ReconstructResponse.
Constructor Details
#initialize(json) ⇒ ReconstructResponse
Returns a new instance of ReconstructResponse.
14 15 16 17 18 |
# File 'lib/retab/splits/reconstruct_response.rb', line 14 def initialize(json) super() hash = self.class.normalize(json) @tables = (hash[:tables] || []).map { |item| item ? Retab::ReconstructEnrichedTable.new(item) : nil } end |
Instance Attribute Details
#tables ⇒ Object
Returns the value of attribute tables.
12 13 14 |
# File 'lib/retab/splits/reconstruct_response.rb', line 12 def tables @tables end |