Class: Retab::ParseOutput

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/parses/parse_output.rb

Constant Summary collapse

HASH_ATTRS =
{
  pages: :pages,
  text: :text
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

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

#pagesObject

Returns the value of attribute pages.



13
14
15
# File 'lib/retab/parses/parse_output.rb', line 13

def pages
  @pages
end

#textObject

Returns the value of attribute text.



13
14
15
# File 'lib/retab/parses/parse_output.rb', line 13

def text
  @text
end