Class: Retab::ParseOutput
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ParseOutput
- Defined in:
- lib/retab/parses/parse_output.rb
Constant Summary collapse
- HASH_ATTRS =
{ pages: :pages, text: :text }.freeze
Instance Attribute Summary collapse
-
#pages ⇒ Object
Returns the value of attribute pages.
-
#text ⇒ Object
Returns the value of attribute text.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ParseOutput
constructor
A new instance of ParseOutput.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ParseOutput
Returns a new instance of ParseOutput.
17 18 19 20 21 |
# File 'lib/retab/parses/parse_output.rb', line 17 def initialize(json) hash = self.class.normalize(json) @pages = (hash[:pages] || []) @text = hash[:text] end |
Instance Attribute Details
#pages ⇒ Object
Returns the value of attribute pages.
13 14 15 |
# File 'lib/retab/parses/parse_output.rb', line 13 def pages @pages end |
#text ⇒ Object
Returns the value of attribute text.
13 14 15 |
# File 'lib/retab/parses/parse_output.rb', line 13 def text @text end |