Method: OCI::AiVision::Models::Cell#initialize
- Defined in:
- lib/oci/ai_vision/models/cell.rb
#initialize(attributes = {}) ⇒ Cell
Initializes the object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/oci/ai_vision/models/cell.rb', line 74 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.text = attributes[:'text'] if attributes[:'text'] self.row_index = attributes[:'rowIndex'] if attributes[:'rowIndex'] raise 'You cannot provide both :rowIndex and :row_index' if attributes.key?(:'rowIndex') && attributes.key?(:'row_index') self.row_index = attributes[:'row_index'] if attributes[:'row_index'] self.column_index = attributes[:'columnIndex'] if attributes[:'columnIndex'] raise 'You cannot provide both :columnIndex and :column_index' if attributes.key?(:'columnIndex') && attributes.key?(:'column_index') self.column_index = attributes[:'column_index'] if attributes[:'column_index'] self.confidence = attributes[:'confidence'] if attributes[:'confidence'] self.bounding_polygon = attributes[:'boundingPolygon'] if attributes[:'boundingPolygon'] raise 'You cannot provide both :boundingPolygon and :bounding_polygon' if attributes.key?(:'boundingPolygon') && attributes.key?(:'bounding_polygon') self.bounding_polygon = attributes[:'bounding_polygon'] if attributes[:'bounding_polygon'] self.word_indexes = attributes[:'wordIndexes'] if attributes[:'wordIndexes'] raise 'You cannot provide both :wordIndexes and :word_indexes' if attributes.key?(:'wordIndexes') && attributes.key?(:'word_indexes') self.word_indexes = attributes[:'word_indexes'] if attributes[:'word_indexes'] end |