Class: AmazonTRP::Word
- Inherits:
-
Object
- Object
- AmazonTRP::Word
- Defined in:
- lib/amazon-textract-parser-ruby.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#confidence ⇒ Object
readonly
Returns the value of attribute confidence.
-
#geometry ⇒ Object
readonly
Returns the value of attribute geometry.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(block, blockMap) ⇒ Word
constructor
A new instance of Word.
- #to_s ⇒ Object
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
#block ⇒ Object (readonly)
Returns the value of attribute block.
75 76 77 |
# File 'lib/amazon-textract-parser-ruby.rb', line 75 def block @block end |
#confidence ⇒ Object (readonly)
Returns the value of attribute confidence.
71 72 73 |
# File 'lib/amazon-textract-parser-ruby.rb', line 71 def confidence @confidence end |
#geometry ⇒ Object (readonly)
Returns the value of attribute geometry.
72 73 74 |
# File 'lib/amazon-textract-parser-ruby.rb', line 72 def geometry @geometry end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
73 74 75 |
# File 'lib/amazon-textract-parser-ruby.rb', line 73 def id @id end |
#text ⇒ Object (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_s ⇒ Object
85 86 87 |
# File 'lib/amazon-textract-parser-ruby.rb', line 85 def to_s @text end |