Class: Kreuzberg::Result::Image

Inherits:
Struct
  • Object
show all
Defined in:
lib/kreuzberg/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bits_per_componentObject

Returns the value of attribute bits_per_component

Returns:

  • (Object)

    the current value of bits_per_component



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def bits_per_component
  @bits_per_component
end

#bounding_boxObject

Returns the value of attribute bounding_box

Returns:

  • (Object)

    the current value of bounding_box



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def bounding_box
  @bounding_box
end

#colorspaceObject

Returns the value of attribute colorspace

Returns:

  • (Object)

    the current value of colorspace



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def colorspace
  @colorspace
end

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def data
  @data
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def description
  @description
end

#formatObject

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def format
  @format
end

#heightObject

Returns the value of attribute height

Returns:

  • (Object)

    the current value of height



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def height
  @height
end

#image_indexObject

Returns the value of attribute image_index

Returns:

  • (Object)

    the current value of image_index



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def image_index
  @image_index
end

#is_maskObject

Returns the value of attribute is_mask

Returns:

  • (Object)

    the current value of is_mask



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def is_mask
  @is_mask
end

#ocr_resultObject

Returns the value of attribute ocr_result

Returns:

  • (Object)

    the current value of ocr_result



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def ocr_result
  @ocr_result
end

#page_numberObject

Returns the value of attribute page_number

Returns:

  • (Object)

    the current value of page_number



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def page_number
  @page_number
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



74
75
76
# File 'lib/kreuzberg/result.rb', line 74

def width
  @width
end

Instance Method Details

#to_hObject



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/kreuzberg/result.rb', line 88

def to_h
  {
    data: data,
    format: format,
    image_index: image_index,
    page_number: page_number,
    width: width,
    height: height,
    colorspace: colorspace,
    bits_per_component: bits_per_component,
    is_mask: is_mask,
    description: description,
    bounding_box: bounding_box&.to_h,
    ocr_result: ocr_result&.to_h
  }
end