Class: AmazonTRP::Word

Inherits:
Object
  • Object
show all
Defined in:
lib/amazon-textract-parser-ruby.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(block, blockMap) ⇒ Word

Returns a new instance of Word.



77
78
79
80
81
82
83
# File 'lib/amazon-textract-parser-ruby.rb', line 77

def initialize(block, blockMap)
  @block = block
  @confidence = block[:confidence]
  @geometry = Geometry.new(block[:geometry])
  @id = block[:id]
  @text = block[:text] || ""
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



75
76
77
# File 'lib/amazon-textract-parser-ruby.rb', line 75

def block
  @block
end

#confidenceObject (readonly)

Returns the value of attribute confidence.



71
72
73
# File 'lib/amazon-textract-parser-ruby.rb', line 71

def confidence
  @confidence
end

#geometryObject (readonly)

Returns the value of attribute geometry.



72
73
74
# File 'lib/amazon-textract-parser-ruby.rb', line 72

def geometry
  @geometry
end

#idObject (readonly)

Returns the value of attribute id.



73
74
75
# File 'lib/amazon-textract-parser-ruby.rb', line 73

def id
  @id
end

#textObject (readonly)

Returns the value of attribute text.



74
75
76
# File 'lib/amazon-textract-parser-ruby.rb', line 74

def text
  @text
end

Instance Method Details

#to_sObject



85
86
87
# File 'lib/amazon-textract-parser-ruby.rb', line 85

def to_s
  @text
end